Module: AppointmentAuthorization
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/appointment_authorization.rb
Instance Method Summary collapse
- #authorize ⇒ Object protected
- #authorize_with_facilities ⇒ Object protected
- #raise_access_denied ⇒ Object protected
- #raise_access_denied_no_facilities ⇒ Object protected
- #raise_access_denied_no_icn ⇒ Object protected
Instance Method Details
#authorize ⇒ Object (protected)
8 9 10 11 |
# File 'app/controllers/concerns/appointment_authorization.rb', line 8 def raise_access_denied unless current_user.loa3? raise_access_denied_no_icn if current_user.icn.blank? end |
#authorize_with_facilities ⇒ Object (protected)
13 14 15 16 |
# File 'app/controllers/concerns/appointment_authorization.rb', line 13 def raise_access_denied_no_facilities unless current_user.(:vaos, :facilities_access?) end |
#raise_access_denied ⇒ Object (protected)
18 19 20 |
# File 'app/controllers/concerns/appointment_authorization.rb', line 18 def raise_access_denied raise Common::Exceptions::Forbidden, detail: 'You do not have access to online scheduling' end |
#raise_access_denied_no_facilities ⇒ Object (protected)
26 27 28 |
# File 'app/controllers/concerns/appointment_authorization.rb', line 26 def raise_access_denied_no_facilities raise Common::Exceptions::Forbidden, detail: 'No facility associated with user' end |
#raise_access_denied_no_icn ⇒ Object (protected)
22 23 24 |
# File 'app/controllers/concerns/appointment_authorization.rb', line 22 def raise_access_denied_no_icn raise Common::Exceptions::Forbidden, detail: 'No patient ICN found' end |