Class: ProtectedRecordManager::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ProtectedRecordManager::ApplicationController
- Defined in:
- app/controllers/protected_record_manager/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#ensure_record_manager ⇒ Object
3 4 5 6 |
# File 'app/controllers/protected_record_manager/application_controller.rb', line 3 def ensure_record_manager current_user || not_found current_user.protected_record_manager || not_found end |
#not_found ⇒ Object
8 9 10 |
# File 'app/controllers/protected_record_manager/application_controller.rb', line 8 def not_found render status: 403, text: 'Resource does not exist, or user lacks required permissions.' and return end |