-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[PM-40210] Add single + bulk PAM enable flows for AccessPam #8161
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π¨ Can we update the hardcoded error strings to follow the pattern in |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,6 +133,14 @@ public async Task UpdateUserAsync(OrganizationUser organizationUser, Organizatio | |
| } | ||
| } | ||
|
|
||
| // Granting PAM access to a member of an organization without PAM would be inert: claim emission ANDs | ||
| // AccessPam with the organization's UsePam. Reject so the admin gets an actionable error instead. | ||
| // Only the grant is gated β revoking access stays possible on an organization whose entitlement has lapsed. | ||
| if (!originalOrganizationUser.AccessPam && organizationUser.AccessPam && !organization.UsePam) | ||
| { | ||
| throw new BadRequestException("To grant PAM access the organization must have PAM enabled."); | ||
| } | ||
|
Comment on lines
+136
to
+142
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we could technically skip this check as enabling pam for a user without it being enabled in the org does nothing. I'll leave it up to AC to decide if it's worth keeping. It would eventually be replaced by the billing seat logic. |
||
|
|
||
| // Only autoscale (if required) after all validation has passed so that we know it's a valid request before | ||
| // updating Stripe | ||
| if (!originalOrganizationUser.AccessSecretsManager && organizationUser.AccessSecretsManager) | ||
|
|
||
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.
π¨ Can we update these string too