Class: Decidim::Budgets::Admin::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::Budgets::Admin::Permissions
- Defined in:
- app/permissions/decidim/budgets/admin/permissions.rb
Instance Method Summary collapse
Instance Method Details
#permissions ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/permissions/decidim/budgets/admin/permissions.rb', line 7 def # The public part needs to be implemented yet return if .scope != :admin return unless [:project, :projects].include?(.subject) case .action when :create .allow! when :import_proposals .allow! when :update, :destroy .allow! if project.present? end end |