Provisioning: Allow viewers to view /status subresource and wait on the frontend before sync (#111576)

This commit is contained in:
Stephanie Hingtgen
2025-09-24 22:37:55 +00:00
committed by GitHub
parent 64c700e563
commit 9172daa3dd
4 changed files with 45 additions and 4 deletions
+5 -1
View File
@@ -355,7 +355,11 @@ func (b *APIBuilder) GetAuthorizer() authorizer.Authorizer {
} else {
return authorizer.DecisionDeny, "editor role is required", nil
}
case "status":
if id.GetOrgRole().Includes(identity.RoleViewer) && a.GetVerb() == apiutils.VerbGet {
return authorizer.DecisionAllow, "", nil
}
return authorizer.DecisionDeny, "users cannot update the status of a repository", nil
default:
if id.GetIsGrafanaAdmin() {
return authorizer.DecisionAllow, "", nil