Logo Search packages:      
Sourcecode: zope-cps version File versions  Download package

def CPSDirectory::LDAPDirectory::LDAPStorageAdapter::_setData (   self,
) [private]

Set data to the entry, from a mapping.

Definition at line 570 of file LDAPDirectory.py.

00570                                   :
        """Set data to the entry, from a mapping."""
        data = self._setDataDoProcess(data, **kw)

        # Get dn by doing a lookup on the current entry.
        user_dn = self._dir._getLDAPEntry(self._id)['dn']

        # Find the rdn attr.
        rdn = user_dn.split(',')[0]
        rdn_attr, rdn_value = rdn.split('=', 1)

        # XXX treat change of rdn

        dir = self._dir
        attrs = dir._makeAttrsFromData(data,
        if attrs:
            msg = dir._delegate.modify(user_dn, # to_utf8 done by backend
            if msg.startswith('STRONG_AUTH_REQUIRED'):
                raise ValueError("Authentication required")
            elif msg:
                raise ValueError("LDAP error: %s" % msg)

    def _getContentUrl(self, entry_id, field_id):

Generated by  Doxygen 1.6.0   Back to index