Class: Decidim::FeedsUi::Admin::Permissions
- Inherits:
-
DefaultPermissions
- Object
- DefaultPermissions
- Decidim::FeedsUi::Admin::Permissions
- Defined in:
- app/permissions/decidim/feeds_ui/admin/permissions.rb
Instance Method Summary collapse
Instance Method Details
#can_access? ⇒ Boolean
16 17 18 19 |
# File 'app/permissions/decidim/feeds_ui/admin/permissions.rb', line 16 def can_access? .subject == :feeds_ui && .action == :read end |
#permissions ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/permissions/decidim/feeds_ui/admin/permissions.rb', line 7 def return if .scope != :admin return unless user&.admin? allow! if can_access? end |