uranusjr commented on a change in pull request #20900:
URL: https://github.com/apache/airflow/pull/20900#discussion_r786569517
##########
File path: airflow/api_connexion/endpoints/role_and_permission_endpoint.py
##########
@@ -147,7 +147,7 @@ def post_role() -> APIResponse:
if not role:
perms = [(item['action']['name'], item['resource']['name']) for item
in data['permissions'] if item]
_check_action_and_resource(security_manager, perms)
- security_manager.init_role(role_name=data['name'], perms=perms)
+ security_manager.bulk_sync_roles([{"role": data["name"], "perms":
perms}])
Review comment:
`init_role()` is deprecated (and simply calls `bulk_sync_roles`), this
removes one deprecation warning.
--
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]