Class: Decidim::Comments::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::Comments::Permissions
- Defined in:
- decidim-comments/app/permissions/decidim/comments/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
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'decidim-comments/app/permissions/decidim/comments/permissions.rb', line 6 def return if .subject != :comment case .action when :read can_read_comments? when :create can_create_comment? when :update, :destroy can_update_comment? when :vote can_vote_comment? end end |