feat(group): 1st implementation of Groups

this implements first version (manageable only by admin right now)

    routes:

        GET /api/groups
        List subject groups (paginated). Admin-only.

        POST /api/groups
        Create a new ReBAC subject group. Admin-only. The name must match the RFC 5321 local-part shape and be globally unique (case-insensitive).

        GET /api/groups/search
        Search non-virtual groups by name substring. Authenticated only (no admin role required) — backs the share-dialog recipient autocomplete.

        GET /api/groups/{id}
        Fetch a single group's details. Admin-only.

        DELETE /api/groups/{id}
        Delete a group. Cascades to `subject_group_members` (FK) and to `access_grants` rows referencing this group as a subject. Admin-only.

        PATCH /api/groups/{id}
        Update a group's metadata. Admin-only. v1 only persists name renames.

        GET /api/groups/{id}/effective-members
        List every user transitively reached through this group (members of members of members, etc.). Used by admin / audit tooling. Admin-only.

        GET /api/groups/{id}/members
        List the *direct* members of a group (one level only). Admin-only.

        POST /api/groups/{id}/members
        Add a member to a group. Exactly one of `user_id` / `group_id` must be provided. Adding a group-member runs a write-time cycle check and a nesting-depth check (max 8). Admin-only.

        DELETE /api/groups/{id}/members/group/{gid}
        Remove a nested group-member from a group. Admin-only.

        DELETE /api/groups/{id}/members/user/{uid}
        Remove a user-member from a group. Admin-only.

fix hurl

groups

round

groups
This commit is contained in:
Edouard Vanbelle
2026-05-30 23:35:47 +02:00
parent 41356b6490
commit 09985f8a95
54 changed files with 6421 additions and 145 deletions
+35 -2
View File
@@ -131,7 +131,8 @@
"light": "Light",
"dark": "Dark",
"auto": "Like OS"
}
},
"manage_groups": "Manage groups"
},
"share": {
"dialogTitle": "Share Link",
@@ -336,7 +337,13 @@
"move_error": "Error moving",
"empty_name": "Name cannot be empty",
"name_exists": "A file or folder with that name already exists",
"generic_error": "An error has occurred"
"generic_error": "An error has occurred",
"group_name_invalid": "Group name must match the email-prefix format (letters, digits, dot, dash, underscore; 1–64 chars).",
"group_cycle": "This member would create a circular group reference.",
"group_depth_exceeded": "This nesting depth exceeds the maximum allowed (8).",
"group_virtual_immutable": "The 'Internal' group is system-managed and cannot be modified.",
"group_not_found": "Group not found.",
"group_name_taken": "A group with this name already exists."
},
"breadcrumb": {
"home": "Home"
@@ -755,5 +762,31 @@
"today": "Today",
"last7days": "Last 7 days",
"last30days": "Last 30 days"
},
"groups": {
"title": "Manage groups",
"create_button": "Create group",
"create_dialog_title": "New group",
"edit_dialog_title": "Rename group",
"name_label": "Name",
"name_placeholder": "engineering",
"description_label": "Description (optional)",
"members_section": "Members",
"add_member_placeholder": "Add a user or group…",
"no_members": "No members yet.",
"remove_member": "Remove",
"delete_group": "Delete group",
"delete_confirm": "Delete the group \"{name}\"? Grants referencing this group will be revoked.",
"empty_state": "No groups yet.",
"load_more": "Load more",
"back_to_list": "Back",
"loading": "Loading…",
"virtual_badge": "System",
"member_count_zero": "no members",
"member_count_one": "1 member",
"member_count_other": "{count} members",
"delete_confirm_label": "Type the group name to confirm:",
"delete_confirm_mismatch": "Type the group name exactly to confirm.",
"virtual_internal_name": "Internal"
}
}