mkristian/dm-ldap-adapter — Issue #12: #save always return true
Author: krissi
Created: 2011-11-03 13:35:34+00:00
State: open

Hi,

I have written the following code:
ldap_connect "uid=testuser,ou=People,o=somewhere", "mypass"
u = User.first(:uid => "otheruser")
u.password = "foo"
p u.save

`u.save` in the last line prints true, but logs the warning
WARN -- Ldap::NetLdapFacade: (Ldap::NetLdapFacade) update error: (50) Insufficient Access Rights
DN: uid=otheruser,ou=People,o=somewhere
[[:add, :userPassword, "foo"]]

I expected to get false as described in http://rubydoc.info/github/datamapper/dm-core/master/DataMapper/Resource:save. Unfortunately returning 0 in LdapAdapter.update is not enough