I am new to Rails and in my app I need to check if a user account is
disabled in Active Directory. I am not using AD for Rails
authentication. I’ve searched around and I’m getting overwhelmed with
the answers. What would be the easiest way to go about this? Should I
just do some type of LDAP query?
Later on I will probably need the ability to enable/disable the Active
Directory account.
if userAccountControl.nil? || userAccountControl.length == 0
return ‘no account’
else
case userAccountControl.first.userAccountControl.first
when (‘512’ || ‘544’ || ‘66048’) then return ‘enabled’
when (‘514’ || ‘546’ || ‘66050’) then return ‘disabled’
else return ‘unknown’
end
end
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.