Open
Conversation
b61ce61 to
2b17980
Compare
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
scazan
reviewed
Mar 5, 2026
apps/app/src/components/decisions/ProcessBuilder/stepContent/general/OverviewSectionForm.tsx
Outdated
Show resolved
Hide resolved
apps/app/src/components/decisions/ProcessBuilder/stepContent/general/OverviewSectionForm.tsx
Show resolved
Hide resolved
scazan
reviewed
Mar 9, 2026
Collaborator
scazan
left a comment
There was a problem hiding this comment.
The idea is right but the check is wrong :)
| stewardProfileId !== existingInstance.stewardProfileId | ||
| ) { | ||
| const ownerProfileUser = existingInstance.ownerProfileId | ||
| ? await getProfileAccessUser({ |
Collaborator
There was a problem hiding this comment.
This only checks that the current user is a member of the owner's profile (that could be a read only member for instance). So we need to assert admin permissions here or simply check that the current user IS the owner. We could check that the user's profileId matches the ownerProfileId which is the simplest. Or, we can be more sophisticated, and say that anyone who has ADMIN access on the owner's profile can act AS the user. In which case, we replace this with a simple call of:
await assertProfileAdmin(user, existingInstance.ownerProfileId);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.