mirror of
https://github.com/owncloud/ocis
synced 2026-05-03 21:12:23 +02:00
enhancement: only use allowed roles for the graph service
This commit is contained in:
@@ -79,9 +79,9 @@ func Validate(cfg *config.Config) error {
|
||||
|
||||
for _, uid := range cfg.UnifiedRoles.AvailableRoles {
|
||||
// check if the role is known
|
||||
if len(unifiedrole.GetDefinitions(unifiedrole.RoleFilterIDs(uid))) == 0 {
|
||||
if len(unifiedrole.GetRoles(unifiedrole.RoleFilterIDs(uid))) == 0 {
|
||||
// collect all possible errors to return them all at once
|
||||
err = errors.Join(err, fmt.Errorf("%w: %s", unifiedrole.ErrUnknownUnifiedRole, uid))
|
||||
err = errors.Join(err, fmt.Errorf("%w: %s", unifiedrole.ErrUnknownRole, uid))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user