Sha256: 45e0961ee7d9db1c08d5e3edf37a6a341278fd766e04aa4ec26122e33598891b

Contents?: true

Size: 616 Bytes

Versions: 25

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class UserModeration < ApplicationRecord
    include Traceable
    include Loggable

    belongs_to :user, foreign_key: :decidim_user_id, class_name: "Decidim::UserBaseEntity"
    has_many :reports, class_name: "Decidim::UserReport", dependent: :destroy

    scope :blocked, -> { joins(:user).where(decidim_users: { blocked: true }) }
    scope :unblocked, -> { joins(:user).where(decidim_users: { blocked: false }) }

    delegate :organization, to: :user

    def self.log_presenter_class_for(_log)
      Decidim::AdminLog::UserModerationPresenter
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/models/decidim/user_moderation.rb
decidim-core-0.28.4 app/models/decidim/user_moderation.rb
decidim-core-0.27.9 app/models/decidim/user_moderation.rb
decidim-core-0.29.0 app/models/decidim/user_moderation.rb
decidim-core-0.28.3 app/models/decidim/user_moderation.rb
decidim-core-0.27.8 app/models/decidim/user_moderation.rb
decidim-core-0.29.0.rc4 app/models/decidim/user_moderation.rb
decidim-core-0.29.0.rc3 app/models/decidim/user_moderation.rb
decidim-core-0.29.0.rc2 app/models/decidim/user_moderation.rb
decidim-core-0.29.0.rc1 app/models/decidim/user_moderation.rb
decidim-core-0.28.2 app/models/decidim/user_moderation.rb
decidim-core-0.27.7 app/models/decidim/user_moderation.rb
decidim-core-0.28.1 app/models/decidim/user_moderation.rb
decidim-core-0.27.6 app/models/decidim/user_moderation.rb
decidim-core-0.28.0 app/models/decidim/user_moderation.rb
decidim-core-0.27.5 app/models/decidim/user_moderation.rb
decidim-core-0.28.0.rc5 app/models/decidim/user_moderation.rb
decidim-core-0.28.0.rc4 app/models/decidim/user_moderation.rb
decidim-core-0.27.4 app/models/decidim/user_moderation.rb
decidim-core-0.27.3 app/models/decidim/user_moderation.rb