jfrag1 commented on a change in pull request #17449:
URL: https://github.com/apache/superset/pull/17449#discussion_r768975089
##########
File path: superset/databases/commands/update.py
##########
@@ -85,3 +89,21 @@ def validate(self) -> None:
exception = DatabaseInvalidError()
exception.add_list(exceptions)
raise exception
+
+ @staticmethod
+ def _update_permissions(
+ database: Database, schemas: List[str], old_db_name: str
+ ) -> None:
+ if old_db_name != database.database_name:
+ security_manager.add_permission_view_menu("database_access",
database.perm)
+ for dataset in database.tables:
+ security_manager.add_permission_view_menu(
Review comment:
There are currently no tests covering these database update/delete
commands - I spent about an hour looking into adding some, but I kept running
into issues/couldn't figure out how to properly set everything up. I'm busy
with other work and don't have time right now to prioritize adding these tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]