mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: Rename 'admin' to 'owner' (#3498)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
This commit is contained in:
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
admin string = "admin"
|
||||
owner string = "owner"
|
||||
member string = "member"
|
||||
templateAdmin string = "template-admin"
|
||||
userAdmin string = "user-admin"
|
||||
@ -24,8 +24,8 @@ const (
|
||||
// Once we have a database implementation, the "default" roles can be defined on the
|
||||
// site and orgs, and these functions can be removed.
|
||||
|
||||
func RoleAdmin() string {
|
||||
return roleName(admin, "")
|
||||
func RoleOwner() string {
|
||||
return roleName(owner, "")
|
||||
}
|
||||
|
||||
func RoleTemplateAdmin() string {
|
||||
@ -59,10 +59,10 @@ var (
|
||||
// https://github.com/coder/coder/issues/1194
|
||||
builtInRoles = map[string]func(orgID string) Role{
|
||||
// admin grants all actions to all resources.
|
||||
admin: func(_ string) Role {
|
||||
owner: func(_ string) Role {
|
||||
return Role{
|
||||
Name: admin,
|
||||
DisplayName: "Admin",
|
||||
Name: owner,
|
||||
DisplayName: "Owner",
|
||||
Site: permissions(map[Object][]Action{
|
||||
ResourceWildcard: {WildcardSymbol},
|
||||
}),
|
||||
@ -187,8 +187,8 @@ var (
|
||||
// The first key is the actor role, the second is the roles they can assign.
|
||||
// map[actor_role][assign_role]<can_assign>
|
||||
assignRoles = map[string]map[string]bool{
|
||||
admin: {
|
||||
admin: true,
|
||||
owner: {
|
||||
owner: true,
|
||||
auditor: true,
|
||||
member: true,
|
||||
orgAdmin: true,
|
||||
|
Reference in New Issue
Block a user