# HG changeset patch # User Sylvain Thénault # Date 1246865691 -7200 # Node ID 2f336fd5e040ecd9848769157093e5780afbd0f0 # Parent e1d2df3f10917574f0f4d3ca74cae6d31c6fa985 euser->cwuser diff -r e1d2df3f1091 -r 2f336fd5e040 server/repository.py --- a/server/repository.py Mon Jul 06 09:34:40 2009 +0200 +++ b/server/repository.py Mon Jul 06 09:34:51 2009 +0200 @@ -418,11 +418,11 @@ continue else: raise AuthenticationError('authentication failed with all sources') - euser = self._build_user(session, eid) + cwuser = self._build_user(session, eid) if self.config.consider_user_state and \ - not euser.state in euser.AUTHENTICABLE_STATES: + not cwuser.state in cwuser.AUTHENTICABLE_STATES: raise AuthenticationError('user is not in authenticable state') - return euser + return cwuser def _build_user(self, session, eid): """return a CWUser entity for user with the given eid""" @@ -430,13 +430,13 @@ rql = cls.fetch_rql(session.user, ['X eid %(x)s']) rset = session.execute(rql, {'x': eid}, 'x') assert len(rset) == 1, rset - euser = rset.get_entity(0, 0) + cwuser = rset.get_entity(0, 0) # pylint: disable-msg=W0104 - # prefetch / cache euser's groups and properties. This is especially + # prefetch / cache cwuser's groups and properties. This is especially # useful for internal sessions to avoid security insertions - euser.groups - euser.properties - return euser + cwuser.groups + cwuser.properties + return cwuser # public (dbapi) interface ################################################