mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/rbac): make organization-member a per-org system custom role (#21359)
Migrated the built-in organization-member role to DB storage so it can be customized per org. Closes https://github.com/coder/internal/issues/1073 (part 1)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
-- Add is_system column to identify system-managed roles.
|
||||
ALTER TABLE custom_roles
|
||||
ADD COLUMN is_system boolean NOT NULL DEFAULT false;
|
||||
|
||||
-- Add member_permissions column for member-scoped permissions within an organization.
|
||||
ALTER TABLE custom_roles
|
||||
ADD COLUMN member_permissions jsonb NOT NULL DEFAULT '[]'::jsonb;
|
||||
|
||||
COMMENT ON COLUMN custom_roles.is_system IS
|
||||
'System roles are managed by Coder and cannot be modified or deleted by users.';
|
||||
Reference in New Issue
Block a user