Sha256: 4bbbe861a8446b6bf8f215154a89e348d649e7d493ad7583fd858230ab72cc43

Contents?: true

Size: 301 Bytes

Versions: 50

Compression:

Stored size: 301 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ReportUserPermissions < DefaultPermissions
    def permissions
      return permission_action unless user

      allow! if permission_action.subject == :user_report && permission_action.action == :create

      permission_action
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.4 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.27.9 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.29.0 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.3 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.27.8 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.29.0.rc4 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.29.0.rc3 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.29.0.rc2 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.29.0.rc1 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.2 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.27.7 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.1 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.27.6 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.26.10 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.26.9 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.0 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.27.5 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.0.rc5 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.28.0.rc4 app/permissions/decidim/report_user_permissions.rb