mirror of
https://github.com/harness/drone.git
synced 2025-05-21 11:29:52 +08:00
feat: [pipe-25436]: restrict user from updating harness-filestore repo (#3472)
* feat: [pipe-25436]: restrict user from updating harness-filestore repo
This commit is contained in:
parent
f237a1f256
commit
3a1348893d
@ -98,6 +98,10 @@ func (c *Controller) Update(ctx context.Context,
|
||||
return nil, fmt.Errorf("failed to sanitize input: %w", err)
|
||||
}
|
||||
|
||||
if err = c.repoCheck.LifecycleRestriction(ctx, session, repoCore); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if in.State != nil &&
|
||||
!slices.Contains(allowedRepoStateTransitions[repo.State], *in.State) {
|
||||
return nil, usererror.BadRequestf("Changing the state of a repository from %s to %s is not allowed.",
|
||||
|
Loading…
Reference in New Issue
Block a user