Class: CurationConcern::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- CurationConcern::BaseController
show all
- Includes:
- Curate::FieldsForAddToCollection, Morphine, Sufia::Noid
- Defined in:
- app/controllers/curation_concern/base_controller.rb
Instance Method Summary
collapse
Instance Method Details
#authorize_curation_concern! ⇒ Object
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'app/controllers/curation_concern/base_controller.rb', line 31
def authorize_curation_concern!
if action_name_for_authorization == :show
if can?(:show, curation_concern)
return true
else
render 'unauthorized', status: :unauthorized
false
end
else
authorize!(action_name_for_authorization, curation_concern) || true
end
end
|
#contributor_agreement ⇒ Object
51
52
53
|
# File 'app/controllers/curation_concern/base_controller.rb', line 51
def contributor_agreement
@contributor_agreement ||= ContributorAgreement.new(curation_concern, current_user, params)
end
|