Skip to content

Commit

Permalink
fix(api): getWorkerModelSecretHandler permission (#6141)
Browse files Browse the repository at this point in the history
Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin authored Apr 7, 2022
1 parent 67d92cb commit e80eb41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/api/router_middleware_auth_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ func (api *API) checkGroupPermissions(ctx context.Context, w http.ResponseWriter
}
}
} else {
// Hatcheries started for "shared.infra" group are granted for group "shared.infra"
if isHatcheryShared(ctx) {
return nil
}
if !isGroupMember(ctx, g) && !isMaintainer(ctx) { // Only group member or CDS maintainer can get a group or its dependencies
return sdk.WithStack(sdk.ErrForbidden)
}
Expand Down

0 comments on commit e80eb41

Please sign in to comment.