betodealmeida commented on a change in pull request #16991:
URL: https://github.com/apache/superset/pull/16991#discussion_r758527587



##########
File path: superset/security/manager.py
##########
@@ -1047,17 +1048,23 @@ def raise_for_access(
 
             assert datasource
 
-            if not (
-                self.can_access_schema(datasource)
-                or self.can_access("datasource_access", datasource.perm or "")
-                or (
-                    feature_flag_manager.is_feature_enabled("DASHBOARD_RBAC")
-                    and self.can_access_based_on_dashboard(datasource)
-                )
-            ):
-                raise SupersetSecurityException(
-                    self.get_datasource_access_error_object(datasource)
-                )
+            self.raise_when_there_is_no_access_to(datasource)
+
+    def raise_when_there_is_no_access_to(self, datasource: BaseDatasource) -> 
None:

Review comment:
       We can discuss which naming strategy is better, but I think we can all 
agree that consistency is a good thing. If we have an existing pattern I think 
it would be better to stick with it, since it makes it easier for people to 
understand the code.




-- 
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]

Reply via email to