Welcome to mirror list, hosted at ThFree Co, Russian Federation.

repair_ldap_blocked_user_service.rb « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6ed42054ac3ecb3d4ab2542c99e954bcbe15932f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class RepairLdapBlockedUserService
  attr_accessor :user

  def initialize(user)
    @user = user
  end

  def execute
    user.block if ldap_hard_blocked?
  end

  private

  def ldap_hard_blocked?
    user.ldap_blocked? && !user.ldap_user?
  end
end