Class: Decidim::Initiatives::Admin::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::Initiatives::Admin::Permissions
- Defined in:
- decidim-initiatives/app/permissions/decidim/initiatives/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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'decidim-initiatives/app/permissions/decidim/initiatives/admin/permissions.rb', line 7 def # The public part needs to be implemented yet return if .scope != :admin return unless user user_can_enter_space_area? return if initiative && !initiative.is_a?(Decidim::Initiative) user_can_read_participatory_space? if !user.admin? && initiative&.(user) initiative_committee_action? initiative_user_action? initiatives_settings_action? return end if !user.admin? && has_initiatives? read_initiative_list_action? return end initiative_filters_action? return unless user.admin? initiative_type_action? initiative_type_scope_action? initiative_committee_action? initiative_admin_user_action? initiative_export_action? initiatives_settings_action? moderator_action? share_tokens_action? allow! if .subject == :attachment end |