stephen-bracken commented on code in PR #76702:
URL: https://github.com/apache/airflow/pull/76702#discussion_r4514010347


##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:
##########
@@ -329,7 +332,11 @@ def _update_read_only_permission_resources(
     scope_ids = [s["id"] for s in scopes if s["name"] in ["GET", "MENU", 
"LIST"]]
     resource_names = TEAM_SCOPED_RESOURCE_NAMES | GLOBAL_SCOPED_RESOURCE_NAMES
     resource_ids = [r["_id"] for r in resources if r["name"] in resource_names]
-    policy_ids = _get_permission_policy_ids(client, client_uuid, permission_id)
+    existing_policy_ids = _get_permission_policy_ids(client, client_uuid, 
permission_id)
+    read_only_policy_id = _get_policy_id(client, client_uuid, 
_role_policy_name(READ_ONLY_ROLE_NAME))
+    policy_ids = [policy_id for policy_id in existing_policy_ids if policy_id 
== read_only_policy_id]
+    if read_only_policy_id and read_only_policy_id not in policy_ids:

Review Comment:
   Updated this, as per the below comment this function should not remove the 
existing role policies from the read only policy



-- 
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]

Reply via email to