mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +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
 | 
						|
}
 |