Class: Decidim::Votings::Admin::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::Votings::Admin::Permissions
- Defined in:
- decidim-elections/app/permissions/decidim/votings/admin/permissions.rb
Instance Method Summary collapse
Methods inherited from DefaultPermissions
Constructor Details
This class inherits a constructor from Decidim::DefaultPermissions
Instance Method Details
#permissions ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'decidim-elections/app/permissions/decidim/votings/admin/permissions.rb', line 7 def return unless user return user_allowed_to_read_admin_dashboard? if read_admin_dashboard_action? return unless .scope == :admin user_can_enter_space_area? return if voting && !voting.is_a?(Decidim::Votings::Voting) unless user_can_read_votings_admin_dashboard? disallow! return end allowed_read_participatory_space? allowed_voting_action? end |