Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleAdmin = "admin" RoleFA = "fa" RoleDomainFA = "domainfa" RoleProjectFA = "projectfa" RoleSA = "sa" RoleProjectOwner = "project_owner" RoleDomainAdmin = "domainadmin" RoleDomainEditor = "domain_editor" RoleDomainViewer = "domain_viewer" RoleProjectEditor = "project_editor" RoleProjectViewer = "project_viewer" RoleMember = "member" )
Variables ¶
View Source
var PredefinedPolicyI18nTable = i18n.Table{}
View Source
var PredefinedRoleI18nTable = i18n.Table{}
View Source
var ( RoleDefinitions = []SRoleDefiniton{ { Name: RoleAdmin, DescriptionCN: "系统管理员", Description: "System administrator", Policies: []string{ "sysadmin", }, Project: "system", IsPublic: false, }, { Name: RoleDomainAdmin, DescriptionCN: "域管理员", Description: "Domain administrator", Policies: []string{ "domain-admin", }, IsPublic: true, }, { Name: RoleProjectOwner, DescriptionCN: "项目主管", Description: "Project owner", Policies: []string{ "project-admin", }, IsPublic: true, }, { Name: RoleFA, DescriptionCN: "系统财务管理员", Description: "System finance administrator", Policies: []string{ "sys-meter-admin", "sys-dashboard", }, IsPublic: false, }, { Name: RoleDomainFA, DescriptionCN: "域财务管理员", Description: "Domain finance administrator", Policies: []string{ "domain-meter-admin", "domain-dashboard", }, IsPublic: true, }, { Name: RoleProjectFA, DescriptionCN: "项目财务管理员", Description: "Project finance administrator", Policies: []string{ "project-meter-admin", "project-dashboard", }, IsPublic: true, }, { Name: RoleDomainEditor, DescriptionCN: "域操作员", Description: "Domain operation administrator", Policies: []string{ "domain-editor", "domain-dashboard", }, IsPublic: true, }, { Name: RoleProjectEditor, DescriptionCN: "项目操作员", Description: "Project operator", Policies: []string{ "project-editor", "project-dashboard", }, IsPublic: true, }, { Name: RoleDomainViewer, DescriptionCN: "域只读管理员", Description: "Domain read-only administrator", Policies: []string{ "domain-viewer", "domain-dashboard", }, IsPublic: true, }, { Name: RoleProjectViewer, DescriptionCN: "项目只读成员", Description: "Project read-only member", Policies: []string{ "project-viewer", "project-dashboard", }, IsPublic: true, }, { Name: "sys_opsadmin", DescriptionCN: "全局系统管理员", Description: "System-wide operation manager", Policies: []string{ "sys-opsadmin", }, IsPublic: true, }, { Name: "sys_secadmin", DescriptionCN: "全局安全管理员", Description: "System-wide security manager", Policies: []string{ "sys-secadmin", }, IsPublic: true, }, { Name: "sys_adtadmin", DescriptionCN: "全局审计管理员", Description: "System-wide audit manager", Policies: []string{ "sys-adtadmin", }, IsPublic: true, }, { Name: "domain_opsadmin", DescriptionCN: "组织系统管理员", Description: "Domain-wide operation manager", Policies: []string{ "domain-opsadmin", }, IsPublic: true, }, { Name: "domain_secadmin", DescriptionCN: "组织安全管理员", Description: "Domain-wide security manager", Policies: []string{ "domain-secadmin", }, IsPublic: true, }, { Name: "domain_adtadmin", DescriptionCN: "组织审计管理员", Description: "Domain-wide audit manager", Policies: []string{ "domain-adtadmin", }, IsPublic: true, }, { Name: "normal_user", DescriptionCN: "缺省普通用户角色", Description: "Default normal user role", Policies: []string{ "normal-user", }, IsPublic: true, }, } )
Functions ¶
This section is empty.
Types ¶
type SPolicyData ¶
type SPolicyData struct { Name string Scope rbacscope.TRbacScope Policy jsonutils.JSONObject Description string DescriptionCN string AvailableRoles []string }
func GenerateAllPolicies ¶
func GenerateAllPolicies() []SPolicyData
Click to show internal directories.
Click to hide internal directories.