Class: NcsNavigator::Authorization::Psc::Authority
- Inherits:
-
Object
- Object
- NcsNavigator::Authorization::Psc::Authority
- Defined in:
- lib/ncs_navigator/authorization/psc/authority.rb
Instance Method Summary collapse
- #get_user_by_id(id, role_detail_level) ⇒ Object
- #get_user_by_username(username, role_detail_level) ⇒ Object
- #get_users_by_role(role_name) ⇒ Object
-
#initialize(ignored_config = nil) ⇒ Authority
constructor
A new instance of Authority.
- #search_users(criteria) ⇒ Object
- #user(staff) ⇒ Object
Constructor Details
#initialize(ignored_config = nil) ⇒ Authority
Returns a new instance of Authority.
5 6 7 8 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 5 def initialize(ignored_config=nil) @logger = Logger.new("#{Java::JavaLang::System.getProperty('catalina.base')}/logs/ncs_navigator_authority.log") @staff_portal_connection ||= staff_portal_client.connection end |
Instance Method Details
#get_user_by_id(id, role_detail_level) ⇒ Object
14 15 16 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 14 def get_user_by_id(id, role_detail_level) user(id) end |
#get_user_by_username(username, role_detail_level) ⇒ Object
10 11 12 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 10 def get_user_by_username(username, role_detail_level) user(username) end |
#get_users_by_role(role_name) ⇒ Object
18 19 20 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 18 def get_users_by_role(role_name) users_hash(get_users_collection_by_role(role_name)) end |
#search_users(criteria) ⇒ Object
22 23 24 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 22 def search_users(criteria) users_hash(get_users_by_search_criteria(criteria)) end |
#user(staff) ⇒ Object
26 27 28 |
# File 'lib/ncs_navigator/authorization/psc/authority.rb', line 26 def user(staff) user_hash(get_user_by_username_or_id(staff)) end |