Added ldap function to check admin permission of user