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: 863cef7ff61fcd73cd6f5ab4173c0cb8a0cdaf5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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