giftig commented on code in PR #25340:
URL: https://github.com/apache/superset/pull/25340#discussion_r1335731756
##########
superset/security/manager.py:
##########
@@ -822,6 +806,19 @@ def sync_role_definitions(self) -> None:
self.get_session.commit()
self.clean_perms()
+ def _get_all_pvms(self) -> list[PermissionView]:
+ # Fetch all pvms
+ pvms = (
+ self.get_session.query(self.permissionview_model)
+ .options(
+ eagerload(self.permissionview_model.permission),
+ eagerload(self.permissionview_model.view_menu),
+ )
+ .all()
+ )
+ pvms = [p for p in pvms if p.permission and p.view_menu]
Review Comment:
pedantic comment but you could just `return` this line instead of updating
the var and returning the var.
--
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]