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.25.0.rc4 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.25.0.rc3 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.25.0.rc2 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.25.0.rc1 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.3 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.2 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.1 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.0 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.0.rc2 app/permissions/decidim/report_user_permissions.rb
decidim-core-0.24.0.rc1 app/permissions/decidim/report_user_permissions.rb