-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(console): Disable admin privileges for paid seats on payment failures/stops #2709
feat(console): Disable admin privileges for paid seats on payment failures/stops #2709
Conversation
if (!freeMembers.includes(identityURN)) { | ||
return { | ||
error: new UnauthorizedError({ | ||
message: 'Unauthorized', |
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.
Make this a bit more descriptive, talking about lack of administrative permissions to change/create/delete.
if (!members.includes(identityURN)) { | ||
return { | ||
error: new UnauthorizedError({ | ||
message: 'Unauthorized', |
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.
Similar to above
0a8ebad
to
5870cbd
Compare
@@ -23,6 +31,21 @@ export const rotateApiKey = async ({ | |||
`Request received for clientId ${input.clientId} which is not owned by provided account.` | |||
) | |||
|
|||
const caller = router.createCaller(ctx) | |||
const { edges: appOwnershipEdges } = await caller.edges.getEdges({ | |||
query: { dst: { baseUrn: appURN }, tag: EDGE_APPLICATION }, |
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.
As discussed, pull this out into a function and use where appropriate in the starbase mutation procs.
throw new UnauthorizedError({ | ||
message: 'You are not authorized to update this identity group.', | ||
message: 'You are not authorized to read this identity group.', | ||
}) | ||
} |
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.
Further below, when stripe payer data is updated, even when payment information isn't updated, the flag is being reset and the CTA/warnings for seats needed vs. seats available go away.
@@ -194,6 +197,21 @@ export default () => { | |||
) : null} | |||
</section> | |||
|
|||
{groupURN && paymentFailedIdentityGroups.includes(groupURN) && ( |
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.
Putting the comment here as reminder: Seat numbers in billing page should be calculated taking into account invited/pending users, not only the ones who have accepted the invitation.
5ea3654
to
0d6fdcf
Compare
0d6fdcf
to
7e4768a
Compare
Description
Related Issues
Testing
Checklist