You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/21 16:04:41 UTC

[GitHub] john-bodley opened a new pull request #5684: [security] Moving set/merge perm to security manager

john-bodley opened a new pull request #5684: [security] Moving set/merge perm to security manager
URL: https://github.com/apache/incubator-superset/pull/5684
 
 
   This PR refactors (copy and paste) the helper `set_perm` and `merge_perm` methods to be encompassed within the security manager which ensures that the manager controls all reads/writes related to data permissions. 
   
   Note the `helpers.merge_perm` logic is part of `SupersetSecurityManager.set_perm` as there already exists a `SupersetSecurityManager.merge_perm` method. Though the logic is similar the database connection logic differs. When I tried to use the later, though I was able to read, writes failed with the following exception,
   ```
   sqlalchemy.exc.ResourceClosedError: This transaction is closed
   ```
   hence the reason for simply copy-and-pasting the current logic. The one exception is the `permission` and `view_menu` should only be refreshed only if updated.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org