Class: Decidim::ActionDelegator::Verifications::DelegationsAuthorizer
- Inherits:
-
Verifications::DefaultActionAuthorizer
- Object
- Verifications::DefaultActionAuthorizer
- Decidim::ActionDelegator::Verifications::DelegationsAuthorizer
- Defined in:
- lib/decidim/action_delegator/verifications/delegations_authorizer.rb
Instance Method Summary collapse
Instance Method Details
#authorize ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/decidim/action_delegator/verifications/delegations_authorizer.rb', line 7 def status = super return status unless status == [:ok, {}] # if used outside a consultation, allow all return [:ok, {}] if consultation.blank? return [:ok, {}] if belongs_to_consultation? && user_in_census? [:unauthorized, { extra_explanation: extra_explanations }] end |