Class: Decidim::ActionDelegator::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::ActionDelegator::Permissions
- Defined in:
- app/permissions/decidim/action_delegator/permissions.rb
Constant Summary collapse
- SUBJECTS_WHITELIST =
[:delegation, :ponderation, :participant, :setting, :consultation].freeze
Instance Method Summary collapse
Instance Method Details
#permissions ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/permissions/decidim/action_delegator/permissions.rb', line 8 def allowed_delegation_action? return unless user && user.admin? return unless .scope == :admin return unless action_delegator_subject? allow! if can_perform_action? end |