-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename "Library ID" to "University ID"
Connects to sul-dlss/SearchWorks#3773 This commit helps us move the access portfolio beyond using library barcode numbers, leaning instead on the university-assigned and -managed "university ID." - [ ] Figure out how to test this and roll it out.
- Loading branch information
Showing
43 changed files
with
192 additions
and
243 deletions.
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
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
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
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 |
---|---|---|
|
@@ -12,8 +12,8 @@ def self.anonymous | |
@anonymous ||= Ability.new(User.new(name: 'generic', email: '[email protected]')) | ||
end | ||
|
||
def self.with_a_library_id | ||
@with_a_library_id ||= Ability.new(User.new(library_id: '0000000000')) | ||
def self.with_a_univ_id | ||
@with_a_univ_id ||= Ability.new(User.new(univ_id: '000000000')) | ||
end | ||
|
||
def self.sso | ||
|
@@ -63,18 +63,18 @@ def initialize(user, token = nil) | |
can :new, Request | ||
|
||
# ... but only some types of users can actually submit the request successfully | ||
if user.sso_user? || user.library_id_user? || user.name_email_user? | ||
if user.sso_user? || user.univ_id_user? || user.name_email_user? | ||
can :create, MediatedPage | ||
can :create, Page | ||
end | ||
|
||
if user.name_email_user? && !user.library_id_user? | ||
if user.name_email_user? && !user.univ_id_user? | ||
cannot :create, Page, origin: 'BUSINESS' | ||
cannot :create, Page, origin: 'MEDIA-MTXT' | ||
cannot :create, Page, origin: 'MEDIA-CENTER' | ||
end | ||
|
||
can :create, HoldRecall if user.library_id_user? || user.sso_user? | ||
can :create, HoldRecall if user.univ_id_user? || user.sso_user? | ||
can :create, Scan if user.super_admin? || in_scan_pilot_group?(user) | ||
|
||
# ... and to check the status, you either need to be logged in or include a special token in the URL | ||
|
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
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
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
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
Oops, something went wrong.