From 4d261d20d5a6710e4b6a23f53cf5f3325b5665a0 Mon Sep 17 00:00:00 2001 From: ngqile Date: Thu, 26 Nov 2026 20:26:46 +0800 Subject: [PATCH] docs: hide ROLE_ADMIN from role management (attached to every admin, grants nothing) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM --- openspec/changes/add-admin-auth-users-roles/design.md | 2 +- .../add-admin-auth-users-roles/specs/admin-roles/spec.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openspec/changes/add-admin-auth-users-roles/design.md b/openspec/changes/add-admin-auth-users-roles/design.md index e835415..4299fd6 100644 --- a/openspec/changes/add-admin-auth-users-roles/design.md +++ b/openspec/changes/add-admin-auth-users-roles/design.md @@ -55,7 +55,7 @@ Area `BO`, babyboo's id scheme: `40000000 BO_ROOT` (type R), `40700000 BO_USERS` ### 7. Roles shown -The role list hides `ROLE_MEMBER`. The local seed drops Tastefully's business roles (KYC, merchant, staff and the rest) and keeps `ROLE_SUPER_ADMIN` (1), `ROLE_ADMIN` (2) and `ROLE_MEMBER` (3). +The role list hides `ROLE_MEMBER` and `ROLE_ADMIN` (id 2, attached to every admin by `findUserByToken` and ignored by the module check). The local seed drops Tastefully's business roles (KYC, merchant, staff and the rest) and keeps `ROLE_SUPER_ADMIN` (1), `ROLE_ADMIN` (2) and `ROLE_MEMBER` (3). ### 8. Portal cut-down diff --git a/openspec/changes/add-admin-auth-users-roles/specs/admin-roles/spec.md b/openspec/changes/add-admin-auth-users-roles/specs/admin-roles/spec.md index 8ac436c..6749135 100644 --- a/openspec/changes/add-admin-auth-users-roles/specs/admin-roles/spec.md +++ b/openspec/changes/add-admin-auth-users-roles/specs/admin-roles/spec.md @@ -8,7 +8,7 @@ Admins with the Roles module define roles and choose which back-office modules e ### Requirement: Role list and edit -The system SHALL let an admin with `BO_ROLES` list, create and rename admin roles. Role names SHALL be unique. The member role SHALL NOT appear in the list. +The system SHALL let an admin with `BO_ROLES` list, create and rename admin roles. Role names SHALL be unique. The member role and `ROLE_ADMIN` SHALL NOT appear in the list (`ROLE_ADMIN` is attached to every admin automatically and grants no modules). #### Scenario: Create role @@ -23,7 +23,7 @@ The system SHALL let an admin with `BO_ROLES` list, create and rename admin role ### Requirement: Role permissions -The system SHALL let an admin with `BO_ROLES` choose, for a role, which back-office modules it grants, shown as the module tree. Saving SHALL replace the role's module grants with the chosen set. The super admin role's grants SHALL NOT be editable. +The system SHALL let an admin with `BO_ROLES` choose, for a role, which back-office modules it grants, shown as the module tree. Saving SHALL replace the role's module grants with the chosen set. The grants of the super admin role and of `ROLE_ADMIN` SHALL NOT be editable. #### Scenario: Grant Users module