## Summary - make Coder Agents available to organization members without a separate built-in role - remove the obsolete role from backend and frontend role surfaces - update authorization, UI, documentation, and regression coverage ## Database note This PR intentionally ships no migration so it backports cleanly across diverged migration numbers. Stale `agents-access` grants may remain in user role arrays and org default member roles; the retired name is treated as a grant of nothing (role expansion drops it, assignment validation ignores it, and the name stays reserved). A follow-up PR will add the data cleanup migration. ## Validation - `make gen` - `make lint` - repository pre-commit checks - targeted RBAC, migration, chat API, enterprise, site, Storybook, and race tests - `git diff --check` ## Rollback note Rolling back the deployment restores the previous behavior directly: no data changed, and older binaries still resolve any lingering `agents-access` grants. > Mux created this pull request on Mike's behalf.
23 lines
1.0 KiB
Go
23 lines
1.0 KiB
Go
package codersdk
|
|
|
|
// Ideally these roles would be generated from the rbac/roles.go package.
|
|
const (
|
|
RoleOwner string = "owner"
|
|
RoleMember string = "member"
|
|
RoleTemplateAdmin string = "template-admin"
|
|
RoleUserAdmin string = "user-admin"
|
|
RoleAuditor string = "auditor"
|
|
// Deprecated: the agents-access role was removed. Coder Agents chat
|
|
// access is part of the organization-member permission floor, and
|
|
// servers without this built-in role reject assigning it.
|
|
RoleAgentsAccess string = "agents-access"
|
|
|
|
RoleOrganizationAdmin string = "organization-admin"
|
|
RoleOrganizationMember string = "organization-member"
|
|
RoleOrganizationAuditor string = "organization-auditor"
|
|
RoleOrganizationTemplateAdmin string = "organization-template-admin"
|
|
RoleOrganizationUserAdmin string = "organization-user-admin"
|
|
RoleOrganizationWorkspaceCreationBan string = "organization-workspace-creation-ban"
|
|
RoleOrganizationWorkspaceAccess string = "organization-workspace-access"
|
|
)
|