Module: Decidim::AnonymousProposals::PermissionsOverrides
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/permissions/decidim/anonymous_proposals/permissions_overrides.rb
Overview
Method overrides to avoid errors when current_user is not present
Instance Method Summary collapse
Instance Method Details
#permissions ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/permissions/decidim/anonymous_proposals/permissions_overrides.rb', line 9 def return unless user_or_anonymous_action?() # Delegate the admin permission checks to the admin permissions class return Decidim::Proposals::Admin::Permissions.new(user, , context). if .scope == :admin return if .scope != :public case .subject when :proposal () when :collaborative_draft () else end end |