RBAC
My team dashboard needs admins, editors, and read-only viewers—AI suggested RBAC. How should I split it up?
admin, editor, and viewer roles with explicit permission sets avoids toggling rights user by user, and changing one role revokes access cleanly. RBAC only says what a role may do in general; restricting edits to a user's own draft or workspace still needs a server-side ownership check.You can say this to an AI Agent
Ready to paste into Cursor, Claude Code, or CodexStructure admin permissions with RBAC: define `admin`, `editor`, and `viewer` roles mapped to explicit permissions on the server, check permissions rather than scattered `role === 'admin'` branches, and add an ownership check for editing or deleting private drafts. Test direct API calls with a viewer account and another editor's account to confirm both return 403 and leave data untouched.
