Mercurial > kallithea
diff rhodecode/model/db.py @ 3470:649ca0cc8a08
fixes #762, LDAP and container created users are now activated based on
the registration settings in permissions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 14 Feb 2013 23:34:59 +0100 |
parents | cf00e8d39f22 |
children | 702da441f5c4 |
line wrap: on
line diff
--- a/rhodecode/model/db.py Tue Feb 12 23:15:55 2013 +0100 +++ b/rhodecode/model/db.py Thu Feb 14 23:34:59 2013 +0100 @@ -399,6 +399,15 @@ def is_admin(self): return self.admin + @property + def AuthUser(self): + """ + Returns instance of AuthUser for this user + """ + from rhodecode.lib.auth import AuthUser + return AuthUser(user_id=self.user_id, api_key=self.api_key, + username=self.username) + def __unicode__(self): return u"<%s('id:%s:%s')>" % (self.__class__.__name__, self.user_id, self.username)