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. [ Full content available at: https://github.com/apache/incubator-superset/pull/5684 ] This message was relayed via gitbox.apache.org for [email protected]
