Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OrgOwner = NewRole( "org_owner", permissions.NamespaceOrg, permissions.AppCreate, permissions.AppDelete, permissions.AppUpdate, permissions.AppList, permissions.AppStatus, permissions.OrgUpdate, permissions.OrgDelete, permissions.TokenIssue, permissions.TokenDelete, ) OrgAdmin = NewRole( "org_developer", permissions.NamespaceOrg, permissions.AppCreate, permissions.AppDelete, permissions.AppUpdate, permissions.AppList, permissions.AppStatus, permissions.TokenIssue, permissions.TokenDelete, ) )
View Source
var ( SystemAuth = NewSystemRole( "auth", permissions.UserCreate, permissions.UserGetAll, permissions.UserDelete, permissions.UserGet, permissions.UserUpdate, permissions.OrgCreate, permissions.OrgList, permissions.OrgListAll, permissions.OrgDelete, permissions.OrgUpdate, permissions.OrgMemberManagement, permissions.OrgMemberList, permissions.UserOrgGetRoleBinding, permissions.TokenIssue, permissions.TokenValidate, ) SystemAdmin = NewSystemRole( "system_admin", permissions.UserGetAll, permissions.UserDelete, permissions.UserGet, permissions.UserUpdate, permissions.TokenIssue, permissions.TokenDelete, permissions.OrgCreate, permissions.OrgList, permissions.OrgListAll, permissions.OrgDelete, permissions.OrgUpdate, permissions.OrgUpdate, permissions.AppCreate, permissions.AppUpdate, permissions.AppDelete, permissions.AppList, permissions.AppStatus, ) SystemDeveloper = NewSystemRole( "system_developer", permissions.UserGetAll, permissions.OrgCreate, permissions.OrgList, ) )
View Source
var ( Self = NewRole( "user_self", permissions.NamespaceUser, permissions.AppCreate, permissions.AppDelete, permissions.AppUpdate, permissions.AppList, permissions.AppStatus, permissions.TokenIssue, permissions.TokenDelete, permissions.UserDelete, permissions.UserGet, permissions.UserUpdate, ) )
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct { Name string `json:"name" yaml:"name"` Type permissions.NamespaceType `json:"type" yaml:"type"` Permissions []*permissions.Permission `json:"permissions" yaml:"permissions"` }
func NewRole ¶
func NewRole(name string, nsType permissions.NamespaceType, perms ...*permissions.Permission) *Role
type SystemRole ¶
type SystemRole struct { Name string `json:"name" yaml:"name"` Permissions []*permissions.Permission `json:"permissions" yaml:"permissions"` }
func FindSystemRole ¶
func FindSystemRole(name string) *SystemRole
func NewSystemRole ¶
func NewSystemRole(name string, perms ...*permissions.Permission) *SystemRole
Click to show internal directories.
Click to hide internal directories.