2015-01-11 41 views
1

我不明白這個創業板devise_ldap_authenticatable如何處理組。它是否依賴於memberOf objectAttribute的用戶?那麼我沒有這個覆蓋。我只有posixGroups與memberuid屬性。我曾認爲這足以讓寶石工作,但Devise::LDAP::Adapter.get_groups('username")方法不斷響應空陣列。Rails通過memberuid設計LDAP用戶組

(認證本身運作良好,但我不能檢索用戶組)

我的配置:

development: 
    host: ldap.myorg.com 
    group_base: "ou=Group,dc=myorg,dc=com" 
    port: 636 
    attribute: uid 
    base: "ou=People,dc=myorg,dc=com" 
    admin_user: "cn=intranet,dc=myorg,dc=com" 
    admin_password: "somepw" 
    ssl: simple_tls 
    # <<: *AUTHORIZATIONS 

I DO指定group_base: "ou=Group,dc=myorg,dc=com"所以不應該有任何問題,找到該組像"cn=Some Group,ou=Group,dc=myorg,dc=com"爲用戶"uid=username,ou=Group,dc=myorg,dc=com" ??

回答

1

*咳嗽*在撰寫本文時,gem有一個硬編碼值,只允許uniqueMember屬性。看到這link。但是,應該可以匹配另一個只改變其中一個gem源文件中的字符串的屬性。