jedcunningham commented on a change in pull request #15017:
URL: https://github.com/apache/airflow/pull/15017#discussion_r602442775
##########
File path: airflow/www/security.py
##########
@@ -171,12 +172,26 @@ def __init__(self, appbuilder):
view.datamodel = CustomSQLAInterface(view.datamodel.obj)
self.perms = None
+ def init_role(self, role_name, perms):
+ """
+ Initialize the role with the permissions and related view-menus.
+ :param role_name:
+ :param perms:
+ :return:
+ """
+ warnings.warn(
+ "`init_role` has been deprecated. Please use `sync_default_roles`
instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ self.sync_default_roles([{'role': role_name, 'perms': perms}])
Review comment:
Yeah... `sync_roles` is the natural fit, but it's taken. I'll figure
something out.
--
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]