This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
TTO-153 Logged-in user doesn't see collections despite matching username #30
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
TTO-153 Logged-in user doesn't see collections despite matching username
- `Utils::Get_Remote_User_Names` modified to include case-preserved `REMOTE_USER` and `eppn` components.
- Loading branch information
commit 8128409506b18dd5e7424be03d680fe029f6a26a
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
|
||
use Utils; | ||
|
||
local %ENV = %ENV; | ||
|
||
subtest "Get_Remote_User_Names" => sub { | ||
my $save_remote_user = $ENV{REMOTE_USER}; | ||
my $save_eppn = $ENV{eppn}; | ||
$ENV{eppn} = 'EPPN@default.invalid'; | ||
$ENV{REMOTE_USER} = 'REMOTE_USER@default.invalid'; | ||
subtest "contains lowercase REMOTE_USER" => sub { | ||
ok(1 <= scalar grep(/remote_user/, Utils::Get_Remote_User_Names())); | ||
}; | ||
subtest "contains case-preserved REMOTE_USER" => sub { | ||
ok(1 <= scalar grep(/REMOTE_USER/, Utils::Get_Remote_User_Names())); | ||
}; | ||
subtest "contains lowercase EPPN" => sub { | ||
ok(1 <= scalar grep(/eppn/, Utils::Get_Remote_User_Names())); | ||
}; | ||
subtest "contains case-preserved EPPN" => sub { | ||
ok(1 <= scalar grep(/EPPN/, Utils::Get_Remote_User_Names())); | ||
}; | ||
$ENV{REMOTE_USER} = $save_remote_user; | ||
$ENV{eppn} = $save_eppn; | ||
}; | ||
|
||
done_testing(); |
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.
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.
If I understand correctly, line 110 gets the lowercased
REMOTE_USER
, and this line gets a case-preserved version?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.
Yes, that's right.