mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-31 07:26:35 +08:00
可以根据管理界面设置/用户界面设置隐藏财务相关功能菜单
This commit is contained in:
@@ -52,6 +52,15 @@ func UpdateAdminUIConfig(uiConfig *systemconfigs.AdminUIConfig) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 是否显示财务信息
|
||||
func ShowFinance() bool {
|
||||
config, _ := LoadAdminUIConfig()
|
||||
if config != nil && !config.ShowFinance {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func loadAdminUIConfig() (*systemconfigs.AdminUIConfig, error) {
|
||||
if sharedAdminUIConfig != nil {
|
||||
return sharedAdminUIConfig, nil
|
||||
@@ -88,5 +97,6 @@ func defaultAdminUIConfig() *systemconfigs.AdminUIConfig {
|
||||
AdminSystemName: "GoEdge管理员系统",
|
||||
ShowOpenSourceInfo: true,
|
||||
ShowVersion: true,
|
||||
ShowFinance: true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user