dominikhei commented on issue #36128:
URL: https://github.com/apache/airflow/issues/36128#issuecomment-1864158574

   Hey @gbonazzoli @potiuk I have thought about a possible structure for the 
exported and imported json. 
   
   We could maybe follow a structure similar to the ``airflow roles list -o 
json -p``command:
   ```
   [{"name": "TestRole", "resource": "Actions", "action": "menu_access"}, 
   {"name": "TestRole", "resource": "Admin", "action": "menu_access"}, 
   {"name": "AnotherTestRole", "resource": "Audit Logs", "action": 
"can_read,menu_access"}]
   ```
   
   Meaning if the command is: ``roles export roles.json -p``  (With the p flag 
being a new addition to support exporting permissions), we would export in the 
structure above, otherwise just as it was before or just use ``{'name' : 
'TestRole'}``, what is your take on that? 
   
   This structure would also allow us to reuse some of the code from 
``__roles_add_or_remove_permissions`` to add the permissions if a json of the 
same structure was imported. 
   


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to