-
Notifications
You must be signed in to change notification settings - Fork 40
feat: add organization setting to restrict project-scoped contracts #2602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sylwester Piskozub <[email protected]>
Signed-off-by: Sylwester Piskozub <[email protected]>
Signed-off-by: Sylwester Piskozub <[email protected]>
| var projectID *uuid.UUID | ||
| if req.ProjectReference.IsSet() { | ||
| // Check if organization prevents project-scoped contracts | ||
| if org.PreventProjectScopedContracts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the only place a contract is created? can you check during attestation init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to double check that a contract can only be created on-demand from this use case. I remember it was also created during a workflow creation, or attestation init.
Would you mind posting there an evaluation of those entrypoints and how this feature will work with the other preventWorkflowCreation feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is what we want. What we want is to only allow administrators to create contracts if this setting is set
|
also, what's the use-case here? Can anybody create project contracts? can admins do it? |
migmartri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my inline coments
This PR adds a new organization-level setting that allows administrators to restrict contract creation to only organization-level contracts, preventing project-scoped contracts from being created.