Changeset d0363cc699be2cb05717dcc6729f8b3b75b975df


Ignore:
Timestamp:
31/10/10 02:28:10 (3 years ago)
Author:
Agustin Henze - TiN <tin@…>
Children:
763b1f26f8117dcc9503858f54156c7f49da62ff
Parents:
e8904ca50b028b837b7457cd86c48926ba3c2beb
git-committer:
Agustin Henze - TiN <tin@…> (31/10/10 02:28:10)
Message:

Se pasan todas las cookies al backend, retoque al template de usuario_creado

Location:
arma2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arma2/frontend/user.py

    r6342fd3 rd0363cc  
    33from config import ldapSERVER, ldapBASE, userDict 
    44 
    5 def bookUser(userid, name, password, lug): 
     5def bookUser(userid, name, password, lug, headers): 
    66        """ Nota: Aca no se crea el usuario, solo se reserva y se llama al proceso de flush de datos  
    77        """ 
    8         userDict[userid] = {'name': name, 'password': password, 'lug': lug} 
     8    userDict[userid] = {'name': name, 'password': password, 'lug': lug, 'headers': headers} 
    99        userDict.sync() 
    1010        return True 
  • arma2/idCentral/idcentral/idcentral.py

    re8904ca rd0363cc  
    3636    sug_name_lastname = Option('IdCentral', 'sug_name_lastname', 
    3737            doc=u'Sugerencias para el nombre') 
    38     sug_user_id = Option('IdCentral', 'sug_project_id', 
     38    sug_userid = Option('IdCentral', 'sug_project_id', 
    3939            doc=u'Sugerencias para el Id del usuario') 
    4040    sug_usergroup = Option('IdCentral', 'sug_usergroup', 
     
    6969        if req.method == 'GET': 
    7070            self.data['texcha'] = self.texcha = self.daemon_idCentral.getTexcha() 
    71             self.daemon_idCentral.log('DEBUG', u'[VIEW]: GET %r from ip bla bla y más' % self.client) 
     71            self.daemon_idCentral.log('DEBUG', u'[VIEW]: GET %r' % self.client) 
    7272        elif req.method == 'POST' and action == 'newuser': 
    7373            if self._parser(req): 
     
    7575                self.daemon_idCentral.bookUser(self.data['userid'], 
    7676                        self.data['name_lastname'], '{SHA}' + encodestring(sha1(self.data['passwd']).digest()), 
    77                         self.data['lug_selected']) 
     77                        self.data['lug_selected'], dict(req._inheaders)) 
    7878                return 'usuario_creado.html', self.data, None 
    79             else: 
    80                 self.daemon_idCentral.log('DEBUG', u'[VIEW]: POST %r algún chequeo no fué superado' % self.client) 
    8179        return 'nuevo_usuario.html', self.data, None 
    8280 
     
    120118        if self.daemon_idCentral.checkPasswordStrengh(self.data['passwd']) <= 2 and valid: 
    121119            self.data['error_passwd'] = u'Tu contraseña es demasiado débil' 
    122             self.daemon_idCentral.log('INFO', u'[VIEW]: POST %r pass demasiado débil' % self.client) 
     120            self.daemon_idCentral.log('INFO', u'[VIEW]: POST %r password demasiado débil' % self.client) 
    123121            valid = False 
    124122        return valid 
     
    127125        self.data['intro'] = self.intro 
    128126        self.data['sug_name_lastname'] = self.sug_name_lastname 
    129         self.data['sug_user_id'] = self.sug_user_id 
     127        self.data['sug_userid'] = self.sug_userid 
    130128        self.data['sug_usergroup'] = self.sug_usergroup 
    131129        self.data['sug_passwd'] = self.sug_passwd 
     
    153151        return [('common', resource_filename('trac', 'htdocs')), 
    154152                ('nuldap', resource_filename(__name__, 'htdocs'))] 
    155  
    156  
    157     # IPermissionRequestor methods 
    158     def get_permission_actions(self): 
    159         yield 'CREATE_PROJECT' 
  • arma2/idCentral/idcentral/templates/usuario_creado.html

    r6342fd3 rd0363cc  
    1212  <body> 
    1313 
    14     <h1>Felicitaciones tu nuevo idCentral ha sido creado</h1> 
    15     <p>$passwd_generated</p> 
     14      <h1>Felicitaciones tu nuevo idCentral ha sido creado</h1> 
     15      <p>Tu administrador de Usuario es http://gosa.usla.org.ar, no olvides mantener tus datos actualizados.</p> 
     16      <py:if test="$passwd_generated"> 
     17        <p>Tu clave ha sido generado y es: $passwd_generated</p> 
     18      </py:if> 
    1619 
    1720  </body> 
Note: See TracChangeset for help on using the changeset viewer.