mistercrunch commented on a change in pull request #4409: Add permissions 
decider for delegating access controls.
URL: 
https://github.com/apache/incubator-superset/pull/4409#discussion_r167757524
 
 

 ##########
 File path: superset/config.py
 ##########
 @@ -364,6 +364,24 @@ class CeleryConfig(object):
 # Interval between consecutive polls when using Hive Engine
 HIVE_POLL_INTERVAL = 5
 
+
+# System to handle delegated data access. Implement both is_allowed_access() 
and
+# is_eligible_datasource() to delegate access controls.
+class PermsDecider:
 
 Review comment:
   Shouldn't that be a static class (not meant to be instantiated)? Also note 
that in py2 it's always preferable to derive `object`  as in `class 
PermsDecider(object):`.
   
   Also this base class should probably be declared outside of `config.py` 
(maybe security.py)?
   
   What about simplifying the interface with a simple 
`has_datasource_access(user, datasource)` callable that only applies if it's 
defined?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to