Can a user be member of more than one departmen/sub-department?

Hi all,

we are syncing departments from OU, and we are wondering if there is a way to assign users to more than one department, e.g. by using LDAP aliases. is there a way?

best,
Hp

ok, some digging in the code told me, that the seafile ldap syncer is not dereferencing LDAP aliases. To enable that is a minimal change in the code:

pro/python/seafevents/ldap_syncer/ldap_conn.py:

diff ldap_conn.py ldap_conn.py.org     
16d15
<         self.deref_aliases = 1
25,29d23
< 
<         try:
<             self.conn.set_option(ldap.OPT_DEREF, ldap.DEREF_SEARCHING if self.deref_aliases else ldap.DEREF_NEVER)
<         except ldap.LDAPError as e:
<             logging.warning('Failed to set deref_aliases option, error: %s' % e.message)

(or course this should be configurable, but I did not implement that)

@daniel.pan: is there any chance that you could add that to a future release of seafile?

using dereferencing of LDAP aliases makes it possible, to add an user to any number of (sub)departments simply by creating an LDAP alias under the corresponding OUs. I can provide an example if necessary.

@hkunz Thanks for the suggested modification. We will give it a check.