Class: Decidim::Elections::TrusteeZone::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::Elections::TrusteeZone::Permissions
- Defined in:
- app/permissions/decidim/elections/trustee_zone/permissions.rb
Instance Method Summary collapse
Instance Method Details
#permissions ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/permissions/decidim/elections/trustee_zone/permissions.rb', line 7 def return unless .scope == :trustee_zone case .subject when :trustee, :election toggle_allow(trustee_for_user?) if [:view, :update].member?(.action) when :user allow! if .action == :update_profile end end |