app/permissions/decidim/consultations/permissions.rb in decidim-consultations-0.16.1 vs app/permissions/decidim/consultations/permissions.rb in decidim-consultations-0.17.0
- old
+ new
@@ -4,13 +4,12 @@
module Consultations
class Permissions < Decidim::DefaultPermissions
def permissions
allowed_public_anonymous_action?
- permission_action unless user
+ return permission_action unless user
allowed_public_action?
- permission_action unless permission_action.scope == :admin
return Decidim::Consultations::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin
permission_action
end