Skip to content

Commit

Permalink
test for a user that is in somegroup
Browse files Browse the repository at this point in the history
but not in othergroup
  • Loading branch information
jdub233 committed Nov 13, 2023
1 parent fb1afc5 commit 0022f8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/authorizeRequest/authorizeRequest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ddbMock.on(GetCommand, {
}).resolves({
Item: {
rules: JSON.stringify({
users: ['user1', 'user2', 'test', 'test2'],
users: ['user1', 'user2', 'test', 'test2', 'some_user'],
states: ['faculty', 'staff'],
entitlements: ['https://iam.bu.edu/reg/college/com'],
ranges: ['crc'],
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('authorizeRequest', () => {
const userRequest = {
url: 'https://example-access-point.s3-object-lambda.us-east-1.amazonaws.com/somesite/files/__restricted/somegroup/image.jpg',
headers: {
Eppn: 'user2@bu.edu', // This user should have access to 'somegroup' but not 'othergroup'.
Eppn: 'some_user@bu.edu', // This user should have access to 'somegroup' but not 'othergroup'.
'X-Real-Ip': '127.0.0.1',
'X-Forwarded-Host': 'example.host.bu.edu, example.host.bu.edu',
},
Expand Down

0 comments on commit 0022f8a

Please sign in to comment.