Skip to content

Add Groups resource type and scopes to authorization schema - #5

Open
akshayutture-augment wants to merge 1 commit into
feature-groups-authz-baselinefrom
feature-groups-authz-implementation
Open

Add Groups resource type and scopes to authorization schema#5
akshayutture-augment wants to merge 1 commit into
feature-groups-authz-baselinefrom
feature-groups-authz-implementation

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 17, 2025

Copy link
Copy Markdown

No description provided.

…ation implementation

Closes #35562

Signed-off-by: vramik <vramik@redhat.com>

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Comment augment review to trigger a new review at any time.

Comment on lines +122 to +123
if (hasPermission(groupResource.getId(), AdminPermissionsSchema.VIEW_MEMBERS, AdminPermissionsSchema.MANAGE_MEMBERS)) {
granted.add(groupResource.getId());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In getGroupIdsWithViewPermission, groupResource.getId() is used both to check permissions and to add to granted, but the resource name stores the actual group ID. Consider using groupResource.getName() in both places (and passing that into hasPermission) to avoid failing the lookup via findByName(...) and returning authorization resource IDs instead of group IDs, which can break downstream filtering and permission checks.

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants