Documentation ¶
Index ¶
- Constants
- func AllModuleMaps() []maps.Map
- func AllowModule(adminId int64, module string) bool
- func CheckAdmin(adminId int64) bool
- func FindAdminFullname(adminId int64) string
- func FindAdminTheme(adminId int64) string
- func LoadAdminUIConfig() (*systemconfigs.AdminUIConfig, error)
- func LoadLogConfig() (*systemconfigs.LogConfig, error)
- func LoadSecurityConfig() (*systemconfigs.SecurityConfig, error)
- func LoadUserUIConfig() (*systemconfigs.UserUIConfig, error)
- func NotifyAdminModuleMappingChange() error
- func ShowFinance() bool
- func UpdateAdminTheme(adminId int64, theme string)
- func UpdateAdminUIConfig(uiConfig *systemconfigs.AdminUIConfig) error
- func UpdateLogConfig(logConfig *systemconfigs.LogConfig) error
- func UpdateSecurityConfig(securityConfig *systemconfigs.SecurityConfig) error
- func UpdateUserUIConfig(uiConfig *systemconfigs.UserUIConfig) error
- type AdminModuleCode
- type AdminModuleList
Constants ¶
View Source
const ( SecuritySettingName = "adminSecurityConfig" FrameNone = "" FrameDeny = "DENY" FrameSameOrigin = "SAMEORIGIN" )
View Source
const (
AdminUISettingName = "adminUIConfig"
)
View Source
const (
LogSettingName = "adminLogConfig"
)
View Source
const (
UserUISettingName = "userUIConfig"
)
Variables ¶
This section is empty.
Functions ¶
func FindAdminTheme ¶ added in v0.2.8
FindAdminTheme 查找某个管理员选择的风格
func LoadAdminUIConfig ¶
func LoadAdminUIConfig() (*systemconfigs.AdminUIConfig, error)
func LoadLogConfig ¶
func LoadLogConfig() (*systemconfigs.LogConfig, error)
func LoadSecurityConfig ¶
func LoadSecurityConfig() (*systemconfigs.SecurityConfig, error)
func LoadUserUIConfig ¶
func LoadUserUIConfig() (*systemconfigs.UserUIConfig, error)
func NotifyAdminModuleMappingChange ¶
func NotifyAdminModuleMappingChange() error
func UpdateAdminTheme ¶ added in v0.2.8
UpdateAdminTheme 设置某个管理员的风格
func UpdateAdminUIConfig ¶
func UpdateAdminUIConfig(uiConfig *systemconfigs.AdminUIConfig) error
func UpdateLogConfig ¶
func UpdateLogConfig(logConfig *systemconfigs.LogConfig) error
func UpdateSecurityConfig ¶
func UpdateSecurityConfig(securityConfig *systemconfigs.SecurityConfig) error
func UpdateUserUIConfig ¶
func UpdateUserUIConfig(uiConfig *systemconfigs.UserUIConfig) error
Types ¶
type AdminModuleCode ¶
type AdminModuleCode = string
const ( AdminModuleCodeDashboard AdminModuleCode = "dashboard" // 看板 AdminModuleCodeServer AdminModuleCode = "server" // 网站 AdminModuleCodeNode AdminModuleCode = "node" // 节点 AdminModuleCodeDNS AdminModuleCode = "dns" // DNS AdminModuleCodeNS AdminModuleCode = "ns" // 域名服务 AdminModuleCodeAdmin AdminModuleCode = "admin" // 系统用户 AdminModuleCodeUser AdminModuleCode = "user" // 平台用户 AdminModuleCodeFinance AdminModuleCode = "finance" // 财务 AdminModuleCodeLog AdminModuleCode = "log" // 日志 AdminModuleCodeSetting AdminModuleCode = "setting" // 设置 AdminModuleCodeCommon AdminModuleCode = "common" // 只要登录就可以访问的模块 )
func FindFirstAdminModule ¶
func FindFirstAdminModule(adminId int64) (module AdminModuleCode, ok bool)
FindFirstAdminModule 获取管理员第一个可访问模块
type AdminModuleList ¶
type AdminModuleList struct { IsSuper bool Modules []*systemconfigs.AdminModule Fullname string Theme string }
func (*AdminModuleList) Allow ¶
func (this *AdminModuleList) Allow(module string) bool
Click to show internal directories.
Click to hide internal directories.