gitlab-org--gitlab-foss/app/services/repair_ldap_blocked_user_service.rb
2016-01-08 16:26:04 -02:00

17 lines
252 B
Ruby

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