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