mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 20:00:26 +08:00
24 lines
409 B
Go
24 lines
409 B
Go
package configloaders
|
|
|
|
import "github.com/TeaOSLab/EdgeCommon/pkg/systemconfigs"
|
|
|
|
type AdminModuleList struct {
|
|
IsSuper bool
|
|
Modules []*systemconfigs.AdminModule
|
|
Fullname string
|
|
Theme string
|
|
Lang string
|
|
}
|
|
|
|
func (this *AdminModuleList) Allow(module string) bool {
|
|
if this.IsSuper {
|
|
return true
|
|
}
|
|
for _, m := range this.Modules {
|
|
if m.Code == module {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|