[lc_ldap] dn invité
This commit is contained in:
parent
e38aac75bf
commit
ac19266cbf
1 changed files with 11 additions and 2 deletions
13
lc_ldap.py
13
lc_ldap.py
|
@ -65,7 +65,7 @@ uri = 'ldap://ldap.adm.crans.org/'
|
||||||
base_dn = 'ou=data,dc=crans,dc=org'
|
base_dn = 'ou=data,dc=crans,dc=org'
|
||||||
log_dn = "cn=log"
|
log_dn = "cn=log"
|
||||||
admin_dn = "cn=admin,dc=crans,dc=org"
|
admin_dn = "cn=admin,dc=crans,dc=org"
|
||||||
|
invite_dn = 'ou=invites,ou=data,dc=crans,dc=org'
|
||||||
# Protection contre les typos
|
# Protection contre les typos
|
||||||
created = 'created'
|
created = 'created'
|
||||||
modified = 'modified'
|
modified = 'modified'
|
||||||
|
@ -461,6 +461,8 @@ def new_cransldapobject(conn, dn, mode='ro', ldif = None):
|
||||||
|
|
||||||
if dn == base_dn:
|
if dn == base_dn:
|
||||||
classe = AssociationCrans
|
classe = AssociationCrans
|
||||||
|
elif dn == invite_dn:
|
||||||
|
classe = BaseInvites
|
||||||
elif ldif:
|
elif ldif:
|
||||||
classe = globals()[ldif['objectClass'][0]]
|
classe = globals()[ldif['objectClass'][0]]
|
||||||
else:
|
else:
|
||||||
|
@ -932,9 +934,16 @@ class machine(CransLdapObject):
|
||||||
class AssociationCrans(proprio):
|
class AssociationCrans(proprio):
|
||||||
u""" Association crans (propriétaire particulier)."""
|
u""" Association crans (propriétaire particulier)."""
|
||||||
def delete(self, comm, login):
|
def delete(self, comm, login):
|
||||||
raise EnvironmentError("Détruire le Crans ? Hum…")
|
raise EnvironmentError("Casser le Crans ? Hum…")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class BaseInvites(proprio):
|
||||||
|
u"""Un artefact de la base ldap"""
|
||||||
|
def delete(self, comm, login):
|
||||||
|
raise EnvironmentError("Les pauvres invites")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class adherent(proprio):
|
class adherent(proprio):
|
||||||
u"""Adhérent crans."""
|
u"""Adhérent crans."""
|
||||||
attribs = proprio.attribs + [attributs.aid, attributs.prenom, attributs.tel,
|
attribs = proprio.attribs + [attributs.aid, attributs.prenom, attributs.tel,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue