jhtimmins commented on a change in pull request #10594:
URL: https://github.com/apache/airflow/pull/10594#discussion_r480818779
##########
File path: airflow/www/security.py
##########
@@ -521,6 +524,18 @@ def sync_roles(self):
self.update_admin_perm_view()
self.clean_perms()
+ def sync_resource_permissions(self):
+ """
+ Populates resource-based permissions.
+ """
+ resources = ['Pool', 'Connection', 'Dag', 'DagBag', 'DagRun',
+ 'DagCode', 'Log', 'Task', 'ImportError', 'Variable',
'XCom']
+ actions = ['can_create', 'can_read', 'can_edit', 'can_delete']
Review comment:
Good point @houqp. I've updated it so that the resource is created
dynamically when the decorator is called on the function.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]