Revisión 176
Añadido por jredrejo hace casi 14 años
controlies/branches/web2py/debian/changelog | ||
---|---|---|
controlies (0.3-3) unstable; urgency=low
|
||
|
||
* Añade profesores al grupo teachers y alumnos al students
|
||
|
||
-- José L. Redrejo Rodríguez <jredrejo@debian.org> Tue, 31 May 2011 13:52:41 +0200
|
||
|
||
controlies (0.3-1) unstable; urgency=low
|
||
|
||
* Terminado de implementar en web2py todo lo que había con twisted
|
controlies/branches/web2py/applications/controlies/modules/Users.py | ||
---|---|---|
self.password2 = password2
|
||
self.departments = departments
|
||
self.classrooms = classrooms
|
||
if self.departments.__class__.__name__ == 'str': self.departments=[departments]
|
||
if self.classrooms.__class__.__name__ == 'str': self.classrooms=[classrooms]
|
||
|
||
|
||
def validation(self,action):
|
||
|
||
if action == "add":
|
||
... | ... | |
(ldap.MOD_ADD, 'memberUid', [self.user] )
|
||
]
|
||
|
||
|
||
for n in self.departments:
|
||
self.ldap.modify('cn='+ n +',ou=Group', attr)
|
||
|
||
for n in self.classrooms:
|
||
self.ldap.modify('cn='+ n +',ou=Group', attr)
|
||
|
||
if self.type=='teacher':
|
||
self.ldap.modify('cn=teachers,ou=Group', attr)
|
||
elif self.type=='student':
|
||
self.ldap.modify('cn=students,ou=Group', attr)
|
||
|
||
return "OK"
|
||
|
Exportar a: Unified diff
Arreglada creación de usuarios para meterlos en los departamentos correspondientes