Class: Decidim::Debates::Admin::Permissions
- Inherits:
-
Decidim::DefaultPermissions
- Object
- Decidim::DefaultPermissions
- Decidim::Debates::Admin::Permissions
- Defined in:
- decidim-debates/app/permissions/decidim/debates/admin/permissions.rb
Instance Method Summary collapse
Methods inherited from Decidim::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-debates/app/permissions/decidim/debates/admin/permissions.rb', line 7 def # The public part needs to be implemented yet return if .scope != :admin can_export_debates? return if .subject != :debate case .action when :create, :read, :export allow! when :update toggle_allow(debate && !debate.closed? && debate.official?) when :close toggle_allow(debate&.official?) end end |