cschiewek / devise_ldap_authenticatable

Devise Module for LDAP
MIT License
593 stars 359 forks source link

required_attributes check: allow one or more of a list of values #204

Closed paquettej closed 7 years ago

paquettej commented 9 years ago

Added support for array of attribute values. If user has one of the listed values, the check passes.

Use case: We want to allow users to authenticate if the are part of a particular division. We want to support multiple divisions.

Usage: In ldap.yml, specify an array for a given attribute:

  require_attribute:
    division:
     - "Informatics RD&E"
     - 'Informatics'