Alerting: Update rule access control to return errutil errors (#78284)

* update rule access control to return errutil errors
* use alerting in msgID
This commit is contained in:
Yuri Tseretyan
2023-12-02 01:42:11 +02:00
committed by GitHub
parent 6644e5e676
commit 64feeddc23
12 changed files with 187 additions and 102 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ func (srv RulerSrv) getRulesWithFolderTitleInFolders(c *contextmodel.ReqContext,
}
}
if len(query.NamespaceUIDs) == 0 {
return nil, fmt.Errorf("%w access rules in the specified folders", accesscontrol.ErrAuthorization)
return nil, accesscontrol.NewAuthorizationErrorGeneric("access rules in the specified folders")
}
} else {
for _, folder := range folders {