Fin implementation connecteur pour l'instant

Ecriture des modeles d'operations client fournies par ldap3
This commit is contained in:
Paul Marillonnet 2017-03-01 17:56:38 +01:00
parent 367c534f0b
commit 088bddddf1
2 changed files with 42 additions and 0 deletions

2
doc.md
View File

@ -1109,6 +1109,8 @@ https://docs.djangoproject.com/fr/1.10/topics/i18n/
http://ldap3.readthedocs.io/tutorial.html
https://tools.ietf.org/search/rfc4515
https://docs.djangoproject.com/fr/1.10/ref/class-based-views/generic-editing/
https://jacobian.org/writing/dynamic-form-generation/
https://docs.djangoproject.com/fr/1.10/topics/forms/formsets/
## A lire
http://support.novell.com/techcenter/articles/ana20011101.html
http://www.journaldunet.com/developpeur/xml/analyse/la-federation-d-identite-au-travers-de-saml.shtml

View File

@ -300,6 +300,46 @@ class LDAPResource(BaseResource):
# raise APIError('more or less than one column', data=data)
# return data[0].values()[0]
## TODO
class GenericOperation(models.Model):
foo = TextField()
class AddOperation(models.Model):
distinguished_name = models.TextField('Distinguished name', blank=True, default=base,
help_text='Distinguished name for the \'Add\' operation')
object_class = models.TextField('Object class(es)', blank=True,
help_text='List of object classes')
attributes = models.TextField('Attributes', blank=True,
help_text='Dictionary of attributes for the new entry')
controls = models.TextField('Controls', blank=True,
help_text='Optional request control parameters (see ldap3 doc)')
class DeleteOperation(models.Model):
distinguished_name = models.TextField('Distinguished name', blank=True, default=base,
help_text='Distinguished name for the \'Delete\' operation')
controls = models.TextField('Controls', blank=True,
help_text='Optional request control parameters (see ldap3 doc)')
class ModifyOperation(models.Model):
distinguished_name = models.TextField('Distinguished name', blank=True, default=base,
help_text='Distinguished name for the \'Modify\' operation')
changes = models.TextField('Changes', blank=True,
help_text='Dictionary of changes for the modified entry')
controls = models.TextField('Controls', blank=True,
help_text='Optional request control parameters (see ldap3 doc)')
class ModifyDNOperation(models.Model):
distinguished_name = models.TextField('Distinguished name', blank=True, default=base,
help_text='Distinguished name for the \'ModifyDN\' operation')
relative_dn = models.TextField('Relative distinguished name', blank=True, default=base,
help_text='Relative distinguished name for the \'ModifyDN\' operation')
delete_old_dn = models.BooleanField('Delete old DN?', default=True)
new_superior = models.TextField('New superior', blank=True, default=base,
help_text='New container for the entry')
controls = models.TextField('Controls', blank=True,
help_text='Optional request control parameters (see ldap3 doc)')
class Query(models.Model):
resource = models.ForeignKey(LDAPResource)
slug = models.SlugField('Name (slug)')