Acehaidrey commented on a change in pull request #18916:
URL: https://github.com/apache/airflow/pull/18916#discussion_r733228077
##########
File path: airflow/cli/commands/role_command.py
##########
@@ -42,3 +44,43 @@ def roles_create(args):
for role_name in args.role:
appbuilder.sm.add_role(role_name)
print(f"Added {len(args.role)} role(s)")
+
+
+@suppress_logs_and_warning
+def roles_export(args):
+ """
+ Exports all the rules from the data base to a file.
+ """
+ from airflow.www.security import EXISTING_ROLES
Review comment:
it can be imported at top level but I didnt want to introduce the
additional logging or additional imports to just retrieve the default roles
that come on the app.
I essentially not include the `EXISTING_ROLES` in the export because those
will always by default be installed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]