Skip to content

fix: allow user admins to manage groups #4498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions coderd/rbac/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ var (
ResourceUser.Type: {ActionCreate, ActionRead, ActionUpdate, ActionDelete},
// Full perms to manage org members
ResourceOrganizationMember.Type: {ActionCreate, ActionRead, ActionUpdate, ActionDelete},
ResourceGroup.Type: {ActionCreate, ActionRead, ActionUpdate, ActionDelete},
}),
}
},
Expand Down
9 changes: 9 additions & 0 deletions coderd/rbac/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,15 @@ func TestRolePermissions(t *testing.T) {
false: {memberMe, otherOrgAdmin, otherOrgMember, userAdmin},
},
},
{
Name: "Groups",
Actions: []rbac.Action{rbac.ActionRead},
Resource: rbac.ResourceGroup.InOrg(orgID),
AuthorizeMap: map[bool][]authSubject{
true: {owner, orgAdmin, userAdmin, orgMemberMe},
false: {memberMe, otherOrgAdmin, otherOrgMember, templateAdmin},
},
},
}

for _, c := range testCases {
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Coder offers these user roles in the community edition:
| | User Admin | Template Admin | Owner |
| ------------------------------------------ | ---------- | -------------- | ----- |
| Add and remove Users | ✅ | | ✅ |
| Manage groups (enterprise) | | | |
| Manage groups (enterprise) | | | |
| Change User roles | | | ✅ |
| Manage **ALL** Templates | | ✅ | ✅ |
| View, update and delete **ALL** Workspaces | | ✅ | ✅ |
Expand Down