Skip to content

Feat/group membership functionality#300

Merged
St4NNi merged 13 commits into
mainfrom
feat/group-membership
Jul 1, 2026
Merged

Feat/group membership functionality#300
St4NNi merged 13 commits into
mainfrom
feat/group-membership

Conversation

@St4NNi

@St4NNi St4NNi commented Jun 30, 2026

Copy link
Copy Markdown
Member

Adds the missing group membership management flow for the API and portal member picker: users can be searched, invited to groups, removed from roles/groups, leave groups, and group roles can be managed safely.

Changes

  • Added GET /groups/{id}/members to list group members and assigned roles, restricted to existing group members.
  • Added POST /groups/{id}/members to add users to a group, defaulting to the group user role when no role ids are provided.
  • Added DELETE /groups/{id}/members/{user_id} to remove a user from all group roles or from a specific role via role_id.
  • Added POST /groups/{id}/leave for self-service group leave.
  • Added last-admin protection for member removal and self-leave, returning 409 Conflict when the operation would remove the final group admin.
  • Added POST /groups/{id}/roles to create custom group roles.
  • Added DELETE /groups/{id}/roles/{role_id} to delete non-admin group roles.
  • Added group-role validation so new role permission paths must stay inside the target group prefix.
  • Protected the built-in admin role from deletion and maps the case to 409 Conflict.
  • Added GET /users/search for member-picker user search with same-realm auth, minimum query length, name/email matching, result limiting, and pagination.
  • Added RemoveUserFromGroupOperation, RemoveGroupRoleOperation, and SearchUsersOperation in the operations layer.
  • Hid assigned_users from open group info responses for non-members while keeping assignments visible to group members.
  • Added group membership and role-management regression coverage in aruna/tests/groups.rs and operation-level tests for the new operations.

Related Issues

das-Abroxas
das-Abroxas previously approved these changes Jul 1, 2026

@das-Abroxas das-Abroxas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left two minor comments but these are not important enough to withhold approval. Of course, you're still welcome to address these points.

Comment thread api/src/routes/groups.rs Outdated
Comment thread api/src/routes/groups.rs Outdated

@das-Abroxas das-Abroxas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for addressing and resolving even these minor issues 👍

@St4NNi St4NNi merged commit 9fd54c8 into main Jul 1, 2026
6 checks passed
@St4NNi St4NNi deleted the feat/group-membership branch July 1, 2026 10:49
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.

[feat] Group membership management

2 participants