Skip to content

Commit b0cc62e

Browse files
revert grant construction
1 parent 322f4eb commit b0cc62e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/snowflake/cli/_plugins/streamlit/manager.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ def grant_privileges(self, entity_model: StreamlitEntityModel):
4545
if not entity_model.grants:
4646
return
4747
for grant in entity_model.grants:
48-
# Use connection context to ensure proper database/schema qualification
49-
fqn_with_context = entity_model.fqn.using_connection(self._conn)
50-
grant_sql = f"GRANT {grant.privilege} ON {entity_model.get_type().upper()} {fqn_with_context.sql_identifier} TO ROLE {grant.role}"
51-
self.execute_query(grant_sql)
48+
self.execute_query(grant.get_grant_sql(entity_model))
5249

5350
def get_url(self, streamlit_name: FQN) -> str:
5451
try:

0 commit comments

Comments
 (0)