我试图让用户登录谁在组1或组2中出席 ,但在LDAP授权期间它正在检查两组。ldap设备中的多个组进行身份验证
如果用户存在于group1或group2中,我需要允许他们登录。
有人可以协助吗?
在devise.rb
config.ldap_check_group_membership =真
在ldap.yml
authorizations: &AUTHORIZATIONS
group_base: ou=groups,dc=test,dc=com
required_groups:
cn=admins,ou=groups,dc=test,dc=com -----group1
cn=users,ou=groups,dc=test,dc=com ----- group2
require_attribute:
# objectClass: inetOrgPerson
# authorizationRole: postsAdmin
development:
host: # ip address is to be filled in here..
port: # port number goes here..
attribute: cn
base: # my tree base details go in here..
admin_user: cn=admin_name,dc=test,dc=com
admin_password: # password goes in here..
ssl: true
<<: *AUTHORIZATIONS
也许是一个愚蠢的问题,但也都是管理员用户?如果是这样,您可以删除其中一项要求。或者将管理员添加到用户并删除管理员组。只要你在require部分有两个组,它就需要两个组的成员资格。 –