Skip to content

Commit

Permalink
fix: User revoke own session
Browse files Browse the repository at this point in the history
Description of changes:

Fix issue with a user being able to revoke their own session. Added 'update' permissions to owners for the 'revokerId' field.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
  • Loading branch information
LouPritch authored Jan 31, 2025
1 parent fcc0133 commit 96f85d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amplify/backend/api/team/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type requests
@auth(
rules: [
{ allow: groups, groups: ["Auditors"], operations: [read] }
{ allow: owner, operations: [read]}
{ allow: owner, operations: [read, update]}
{ allow: owner, ownerField: "approver_ids", operations: [update,read] }
{ allow: private, provider: iam, operations: [read, update] }
]
Expand Down Expand Up @@ -369,4 +369,4 @@ type Query {
validateRequest: requests
@function(name: "teamvalidateRequest-${env}")
@auth(rules: [{ allow: private }])
}
}

0 comments on commit 96f85d0

Please sign in to comment.