mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
refactor: move helper functions under common, in usage specific named files (#1540)
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
This commit is contained in:
@@ -106,6 +106,20 @@ type AccessControlConfig struct {
|
||||
Groups Groups
|
||||
}
|
||||
|
||||
func (config *AccessControlConfig) AnonymousPolicyExists() bool {
|
||||
if config == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, repository := range config.Repositories {
|
||||
if len(repository.AnonymousPolicy) > 0 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
type (
|
||||
Repositories map[string]PolicyGroup
|
||||
Groups map[string]Group
|
||||
|
||||
Reference in New Issue
Block a user