diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2013-02-14 23:34:59 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2013-02-14 23:34:59 +0100 |
commit | 6eeb175132f510c91f36145e8cb4fc7aa01ebfb7 (patch) | |
tree | 3c2026f2ede64aba5b809a0617369cf233fbff6a /rhodecode/model/db.py | |
parent | 9f2b1fd8b2e3c51212ffd709032dd51602248c42 (diff) |
fixes #762, LDAP and container created users are now activated based on
the registration settings in permissions
--HG--
extra : source : fdb0f59b21891c21c9b71d8d945d096a1f6a665d
Diffstat (limited to 'rhodecode/model/db.py')
-rwxr-xr-x | rhodecode/model/db.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py index 8219c3b9..7142068a 100755 --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -399,6 +399,15 @@ class User(Base, BaseModel): 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) |