You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1] [bug] FR-7.1.6 Role management — no CREATE ROLE, no role parsing, no UI #435
[P1] [bug] Role management (FR-7.1.6) is completely missing — no CREATE ROLE, no GRANT role, no role list
Context
DESIGN_REQUIREMENTS FR-7.1.6: "Create, assign, and manage MySQL roles (MySQL 8.0+)".
Problem
Per docs/audits/admin.md F7.
MySQL 8.0 added roles (CREATE ROLE 'app_read', GRANT 'app_read' TO 'alice', SET DEFAULT ROLE 'app_read' TO 'alice'). Current implementation: no Roles tab, no information_schema.applicable_roles query, no CREATE ROLE / DROP ROLE buttons, no SET DEFAULT ROLE UI. Privileges editor only deals with *.* and db.* grants. parseGrantStatements regex requires ON clause, which role grants don't have — parser silently skips them.
Files
src/components/admin/UserManagement.tsx (no roles view)
src/components/admin/userPrivileges.ts (no role parsing)
src-tauri/crates/mas-admin/src/lib.rs (no role methods)
Repro (if applicable)
Static analysis only.
Expected
CREATE ROLE 'app_read', list roles in UI, assign to user via checkbox, SET DEFAULT ROLE toggle persists.
Proposed fix
Scope M. Add Roles tab in UserManagement; extend parseGrantStatements regex to /^GRANT\s+(.+?)\s+(?:ON\s+(.+?)\s+)?TO\s+/i; emit kind: 'role' | 'privilege' discriminator.
Acceptance
User with GRANT 'app_read'@'%' TO 'alice'@'localhost' shows the role in the Grants view; round-trip preserves the role grant.
Activity