2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-01-19 16:12:03 +05:30
|
|
|
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
|