changeset 4197:d208416c84c6 kallithea-2.2.5-rebrand

Rename rhodecode_user to authuser - it is an AuthUser instance
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:05:10 -0400
parents 06e49be38d78
children a540f7e69c82
files kallithea/controllers/admin/gists.py kallithea/controllers/admin/my_account.py kallithea/controllers/admin/notifications.py kallithea/controllers/admin/repo_groups.py kallithea/controllers/admin/repos.py kallithea/controllers/admin/user_groups.py kallithea/controllers/admin/users.py kallithea/controllers/api/__init__.py kallithea/controllers/api/api.py kallithea/controllers/changeset.py kallithea/controllers/files.py kallithea/controllers/forks.py kallithea/controllers/journal.py kallithea/controllers/login.py kallithea/controllers/pullrequests.py kallithea/controllers/summary.py kallithea/lib/auth.py kallithea/lib/base.py kallithea/lib/utils.py kallithea/lib/utils2.py kallithea/model/repo.py kallithea/model/user.py kallithea/templates/admin/gists/edit.html kallithea/templates/admin/gists/index.html kallithea/templates/admin/gists/new.html kallithea/templates/admin/gists/show.html kallithea/templates/admin/my_account/my_account.html kallithea/templates/admin/notifications/notifications.html kallithea/templates/admin/notifications/show_notification.html kallithea/templates/admin/repo_groups/repo_group_edit_perms.html kallithea/templates/admin/repos/repo_add.html kallithea/templates/admin/repos/repo_add_base.html kallithea/templates/admin/user_groups/user_group_edit_perms.html kallithea/templates/admin/users/user_edit_profile.html kallithea/templates/base/base.html kallithea/templates/changeset/changeset_file_comment.html kallithea/templates/data_table/_dt_elements.html kallithea/templates/index_base.html kallithea/templates/journal/journal.html kallithea/templates/pullrequests/pullrequest_show.html kallithea/templates/pullrequests/pullrequest_show_all.html kallithea/templates/summary/statistics.html kallithea/templates/summary/summary.html kallithea/tests/__init__.py kallithea/tests/functional/test_login.py
diffstat 45 files changed, 176 insertions(+), 176 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/gists.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/gists.py	Wed Jul 02 19:05:10 2014 -0400
@@ -69,7 +69,7 @@
     def index(self):
         """GET /admin/gists: All items in the collection"""
         # url('gists')
-        not_default_user = c.rhodecode_user.username != User.DEFAULT_USER
+        not_default_user = c.authuser.username != User.DEFAULT_USER
         c.show_private = request.GET.get('private') and not_default_user
         c.show_public = request.GET.get('public') and not_default_user
 
@@ -80,17 +80,17 @@
         # MY private
         if c.show_private and not c.show_public:
             gists = gists.filter(Gist.gist_type == Gist.GIST_PRIVATE)\
-                             .filter(Gist.gist_owner == c.rhodecode_user.user_id)
+                             .filter(Gist.gist_owner == c.authuser.user_id)
         # MY public
         elif c.show_public and not c.show_private:
             gists = gists.filter(Gist.gist_type == Gist.GIST_PUBLIC)\
-                             .filter(Gist.gist_owner == c.rhodecode_user.user_id)
+                             .filter(Gist.gist_owner == c.authuser.user_id)
 
         # MY public+private
         elif c.show_private and c.show_public:
             gists = gists.filter(or_(Gist.gist_type == Gist.GIST_PUBLIC,
                                      Gist.gist_type == Gist.GIST_PRIVATE))\
-                             .filter(Gist.gist_owner == c.rhodecode_user.user_id)
+                             .filter(Gist.gist_owner == c.authuser.user_id)
 
         # default show ALL public gists
         if not c.show_public and not c.show_private:
@@ -122,7 +122,7 @@
             gist_type = Gist.GIST_PUBLIC if _public else Gist.GIST_PRIVATE
             gist = GistModel().create(
                 description=form_result['description'],
-                owner=c.rhodecode_user.user_id,
+                owner=c.authuser.user_id,
                 gist_mapping=nodes,
                 gist_type=gist_type,
                 lifetime=form_result['lifetime']
@@ -176,7 +176,7 @@
         #           method='delete')
         # url('gist', gist_id=ID)
         gist = GistModel().get_gist(gist_id)
-        owner = gist.gist_owner == c.rhodecode_user.user_id
+        owner = gist.gist_owner == c.authuser.user_id
         if h.HasPermissionAny('hg.admin')() or owner:
             GistModel().delete(gist)
             Session().commit()
--- a/kallithea/controllers/admin/my_account.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/my_account.py	Wed Jul 02 19:05:10 2014 -0400
@@ -63,7 +63,7 @@
         super(MyAccountController, self).__before__()
 
     def __load_data(self):
-        c.user = User.get(self.rhodecode_user.user_id)
+        c.user = User.get(self.authuser.user_id)
         if c.user.username == User.DEFAULT_USER:
             h.flash(_("You can't edit this user since it's"
                       " crucial for entire application"), category='warning')
@@ -75,12 +75,12 @@
             repos_list = [x.follows_repository for x in
                           Session().query(UserFollowing).filter(
                               UserFollowing.user_id ==
-                              self.rhodecode_user.user_id).all()]
+                              self.authuser.user_id).all()]
         else:
             admin = True
             repos_list = Session().query(Repository)\
                          .filter(Repository.user_id ==
-                                 self.rhodecode_user.user_id)\
+                                 self.authuser.user_id)\
                          .order_by(func.lower(Repository.repo_name)).all()
 
         repos_data = RepoModel().get_repos_as_dict(repos_list=repos_list,
@@ -95,7 +95,7 @@
         # url('my_account')
         c.active = 'profile'
         self.__load_data()
-        c.perm_user = AuthUser(user_id=self.rhodecode_user.user_id,
+        c.perm_user = AuthUser(user_id=self.authuser.user_id,
                                ip_addr=self.ip_addr)
         c.extern_type = c.user.extern_type
         c.extern_name = c.user.extern_name
@@ -104,8 +104,8 @@
         update = False
         if request.POST:
             _form = UserForm(edit=True,
-                             old_data={'user_id': self.rhodecode_user.user_id,
-                                       'email': self.rhodecode_user.email})()
+                             old_data={'user_id': self.authuser.user_id,
+                                       'email': self.authuser.email})()
             form_result = {}
             try:
                 post_data = dict(request.POST)
@@ -120,7 +120,7 @@
                     # forbid updating username for external accounts
                     skip_attrs.append('username')
 
-                UserModel().update(self.rhodecode_user.user_id, form_result,
+                UserModel().update(self.authuser.user_id, form_result,
                                    skip_attrs=skip_attrs)
                 h.flash(_('Your account was updated successfully'),
                         category='success')
@@ -151,10 +151,10 @@
         c.active = 'password'
         self.__load_data()
         if request.POST:
-            _form = PasswordChangeForm(self.rhodecode_user.username)()
+            _form = PasswordChangeForm(self.authuser.username)()
             try:
                 form_result = _form.to_python(request.POST)
-                UserModel().update(self.rhodecode_user.user_id, form_result)
+                UserModel().update(self.authuser.user_id, form_result)
                 Session().commit()
                 h.flash(_("Successfully updated password"), category='success')
             except formencode.Invalid as errors:
@@ -189,7 +189,7 @@
     def my_account_perms(self):
         c.active = 'perms'
         self.__load_data()
-        c.perm_user = AuthUser(user_id=self.rhodecode_user.user_id,
+        c.perm_user = AuthUser(user_id=self.authuser.user_id,
                                ip_addr=self.ip_addr)
 
         return render('admin/my_account/my_account.html')
@@ -206,7 +206,7 @@
         email = request.POST.get('new_email')
 
         try:
-            UserModel().add_extra_email(self.rhodecode_user.user_id, email)
+            UserModel().add_extra_email(self.authuser.user_id, email)
             Session().commit()
             h.flash(_("Added email %s to user") % email, category='success')
         except formencode.Invalid, error:
@@ -221,7 +221,7 @@
     def my_account_emails_delete(self):
         email_id = request.POST.get('del_email_id')
         user_model = UserModel()
-        user_model.delete_extra_email(self.rhodecode_user.user_id, email_id)
+        user_model.delete_extra_email(self.authuser.user_id, email_id)
         Session().commit()
         h.flash(_("Removed email from user"), category='success')
         return redirect(url('my_account_emails'))
@@ -239,11 +239,11 @@
 
         c.my_pull_requests = _filter(PullRequest.query()\
                                 .filter(PullRequest.user_id ==
-                                        self.rhodecode_user.user_id)\
+                                        self.authuser.user_id)\
                                 .all())
         my_prs = [x.pull_request for x in PullRequestReviewers.query()
                     .filter(PullRequestReviewers.user_id ==
-                        self.rhodecode_user.user_id).all()]
+                        self.authuser.user_id).all()]
         c.participate_in_pull_requests = _filter(my_prs)
         return render('admin/my_account/my_account.html')
 
@@ -259,14 +259,14 @@
             (str(60 * 24 * 30), _('1 month')),
         ]
         c.lifetime_options = [(c.lifetime_values, _("Lifetime"))]
-        c.user_api_keys = ApiKeyModel().get_api_keys(self.rhodecode_user.user_id,
+        c.user_api_keys = ApiKeyModel().get_api_keys(self.authuser.user_id,
                                                      show_expired=show_expired)
         return render('admin/my_account/my_account.html')
 
     def my_account_api_keys_add(self):
         lifetime = safe_int(request.POST.get('lifetime'), -1)
         description = request.POST.get('description')
-        new_api_key = ApiKeyModel().create(self.rhodecode_user.user_id,
+        new_api_key = ApiKeyModel().create(self.authuser.user_id,
                                            description, lifetime)
         Session().commit()
         h.flash(_("Api key successfully created"), category='success')
@@ -274,7 +274,7 @@
 
     def my_account_api_keys_delete(self):
         api_key = request.POST.get('del_api_key')
-        user_id = self.rhodecode_user.user_id
+        user_id = self.authuser.user_id
         if request.POST.get('del_api_key_builtin'):
             user = User.get(user_id)
             if user:
@@ -283,7 +283,7 @@
                 Session().commit()
                 h.flash(_("Api key successfully reset"), category='success')
         elif api_key:
-            ApiKeyModel().delete(api_key, self.rhodecode_user.user_id)
+            ApiKeyModel().delete(api_key, self.authuser.user_id)
             Session().commit()
             h.flash(_("Api key successfully deleted"), category='success')
 
--- a/kallithea/controllers/admin/notifications.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/notifications.py	Wed Jul 02 19:05:10 2014 -0400
@@ -59,8 +59,8 @@
     def index(self, format='html'):
         """GET /_admin/notifications: All items in the collection"""
         # url('notifications')
-        c.user = self.rhodecode_user
-        notif = NotificationModel().get_for_user(self.rhodecode_user.user_id,
+        c.user = self.authuser
+        notif = NotificationModel().get_for_user(self.authuser.user_id,
                                             filter_=request.GET.getall('type'))
 
         p = safe_int(request.GET.get('page', 1), 1)
@@ -82,11 +82,11 @@
         if request.environ.get('HTTP_X_PARTIAL_XHR'):
             nm = NotificationModel()
             # mark all read
-            nm.mark_all_read_for_user(self.rhodecode_user.user_id,
+            nm.mark_all_read_for_user(self.authuser.user_id,
                                       filter_=request.GET.getall('type'))
             Session().commit()
-            c.user = self.rhodecode_user
-            notif = nm.get_for_user(self.rhodecode_user.user_id,
+            c.user = self.authuser
+            notif = nm.get_for_user(self.authuser.user_id,
                                     filter_=request.GET.getall('type'))
             c.notifications = Page(notif, page=1, items_per_page=10)
             return render('admin/notifications/notifications_data.html')
@@ -109,11 +109,11 @@
         # url('notification', notification_id=ID)
         try:
             no = Notification.get(notification_id)
-            owner = all(un.user.user_id == c.rhodecode_user.user_id
+            owner = all(un.user.user_id == c.authuser.user_id
                         for un in no.notifications_to_users)
             if h.HasPermissionAny('hg.admin')() or owner:
                 # deletes only notification2user
-                NotificationModel().mark_read(c.rhodecode_user.user_id, no)
+                NotificationModel().mark_read(c.authuser.user_id, no)
                 Session().commit()
                 return 'ok'
         except Exception:
@@ -131,11 +131,11 @@
         # url('notification', notification_id=ID)
         try:
             no = Notification.get(notification_id)
-            owner = any(un.user.user_id == c.rhodecode_user.user_id
+            owner = any(un.user.user_id == c.authuser.user_id
                         for un in no.notifications_to_users)
             if h.HasPermissionAny('hg.admin')() or owner:
                 # deletes only notification2user
-                NotificationModel().delete(c.rhodecode_user.user_id, no)
+                NotificationModel().delete(c.authuser.user_id, no)
                 Session().commit()
                 return 'ok'
         except Exception:
@@ -146,10 +146,10 @@
     def show(self, notification_id, format='html'):
         """GET /_admin/notifications/id: Show a specific item"""
         # url('notification', notification_id=ID)
-        c.user = self.rhodecode_user
+        c.user = self.authuser
         no = Notification.get(notification_id)
 
-        owner = any(un.user.user_id == c.rhodecode_user.user_id
+        owner = any(un.user.user_id == c.authuser.user_id
                     for un in no.notifications_to_users)
         repo_admin = h.HasRepoPermissionAny('repository.admin')
         if no and (h.HasPermissionAny('hg.admin')() or repo_admin or owner):
--- a/kallithea/controllers/admin/repo_groups.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/repo_groups.py	Wed Jul 02 19:05:10 2014 -0400
@@ -106,9 +106,9 @@
         return data
 
     def _revoke_perms_on_yourself(self, form_result):
-        _up = filter(lambda u: c.rhodecode_user.username == u[0],
+        _up = filter(lambda u: c.authuser.username == u[0],
                      form_result['perms_updates'])
-        _new = filter(lambda u: c.rhodecode_user.username == u[0],
+        _new = filter(lambda u: c.authuser.username == u[0],
                       form_result['perms_new'])
         if _new and _new[0][1] != 'group.admin' or _up and _up[0][1] != 'group.admin':
             return True
@@ -177,7 +177,7 @@
                 group_name=form_result['group_name'],
                 group_description=form_result['group_description'],
                 parent=form_result['group_parent_id'],
-                owner=self.rhodecode_user.user_id,
+                owner=self.authuser.user_id,
                 copy_permissions=form_result['group_copy_permissions']
             )
             Session().commit()
@@ -412,7 +412,7 @@
         c.repo_group = RepoGroupModel()._get_repo_group(group_name)
         valid_recursive_choices = ['none', 'repos', 'groups', 'all']
         form_result = RepoGroupPermsForm(valid_recursive_choices)().to_python(request.POST)
-        if not c.rhodecode_user.is_admin:
+        if not c.authuser.is_admin:
             if self._revoke_perms_on_yourself(form_result):
                 msg = _('Cannot revoke permission for yourself as admin')
                 h.flash(msg, category='warning')
@@ -426,7 +426,7 @@
                                              form_result['perms_updates'],
                                              recursive)
         #TODO: implement this
-        #action_logger(self.rhodecode_user, 'admin_changed_repo_permissions',
+        #action_logger(self.authuser, 'admin_changed_repo_permissions',
         #              repo_name, self.ip_addr, self.sa)
         Session().commit()
         h.flash(_('Repository Group permissions updated'), category='success')
@@ -447,8 +447,8 @@
             elif obj_type == 'user_group':
                 obj_id = safe_int(request.POST.get('user_group_id'))
 
-            if not c.rhodecode_user.is_admin:
-                if obj_type == 'user' and c.rhodecode_user.user_id == obj_id:
+            if not c.authuser.is_admin:
+                if obj_type == 'user' and c.authuser.user_id == obj_id:
                     msg = _('Cannot revoke permission for yourself as admin')
                     h.flash(msg, category='warning')
                     raise Exception('revoke admin permission on self')
--- a/kallithea/controllers/admin/repos.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/repos.py	Wed Jul 02 19:05:10 2014 -0400
@@ -143,7 +143,7 @@
 
             # create is done sometimes async on celery, db transaction
             # management is handled there.
-            task = RepoModel().create(form_result, self.rhodecode_user.user_id)
+            task = RepoModel().create(form_result, self.authuser.user_id)
             from celery.result import BaseAsyncResult
             if isinstance(task, BaseAsyncResult):
                 task_id = task.task_id
@@ -287,7 +287,7 @@
             h.flash(_('Repository %s updated successfully') % repo_name,
                     category='success')
             changed_name = repo.repo_name
-            action_logger(self.rhodecode_user, 'admin_updated_repo',
+            action_logger(self.authuser, 'admin_updated_repo',
                               changed_name, self.ip_addr, self.sa)
             Session().commit()
         except formencode.Invalid, errors:
@@ -334,7 +334,7 @@
                     handle_forks = 'delete'
                     h.flash(_('Deleted %s forks') % _forks, category='success')
             repo_model.delete(repo, forks=handle_forks)
-            action_logger(self.rhodecode_user, 'admin_deleted_repo',
+            action_logger(self.authuser, 'admin_deleted_repo',
                   repo_name, self.ip_addr, self.sa)
             ScmModel().mark_for_invalidation(repo_name)
             h.flash(_('Deleted repository %s') % repo_name, category='success')
@@ -394,7 +394,7 @@
         RepoModel()._update_permissions(repo_name, form['perms_new'],
                                         form['perms_updates'])
         #TODO: implement this
-        #action_logger(self.rhodecode_user, 'admin_changed_repo_permissions',
+        #action_logger(self.authuser, 'admin_changed_repo_permissions',
         #              repo_name, self.ip_addr, self.sa)
         Session().commit()
         h.flash(_('Repository permissions updated'), category='success')
@@ -416,7 +416,7 @@
                     repo=repo_name, group_name=obj_id
                 )
             #TODO: implement this
-            #action_logger(self.rhodecode_user, 'admin_revoked_repo_permissions',
+            #action_logger(self.authuser, 'admin_revoked_repo_permissions',
             #              repo_name, self.ip_addr, self.sa)
             Session().commit()
         except Exception:
@@ -540,7 +540,7 @@
         try:
             fork_id = request.POST.get('id_fork_of')
             repo = ScmModel().mark_as_fork(repo_name, fork_id,
-                                           self.rhodecode_user.username)
+                                           self.authuser.username)
             fork = repo.fork.repo_name if repo.fork else _('Nothing')
             Session().commit()
             h.flash(_('Marked repo %s as fork of %s') % (repo_name, fork),
@@ -565,7 +565,7 @@
         try:
             repo = Repository.get_by_repo_name(repo_name)
             if request.POST.get('set_lock'):
-                Repository.lock(repo, c.rhodecode_user.user_id)
+                Repository.lock(repo, c.authuser.user_id)
                 h.flash(_('Locked repository'), category='success')
             elif request.POST.get('set_unlock'):
                 Repository.unlock(repo)
@@ -592,7 +592,7 @@
                     Repository.unlock(repo)
                     action = _('Unlocked')
                 else:
-                    Repository.lock(repo, c.rhodecode_user.user_id)
+                    Repository.lock(repo, c.authuser.user_id)
                     action = _('Locked')
 
                 h.flash(_('Repository has been %s') % action,
@@ -631,7 +631,7 @@
         c.active = 'remote'
         if request.POST:
             try:
-                ScmModel().pull_changes(repo_name, self.rhodecode_user.username)
+                ScmModel().pull_changes(repo_name, self.authuser.username)
                 h.flash(_('Pulled from remote location'), category='success')
             except Exception, e:
                 log.error(traceback.format_exc())
--- a/kallithea/controllers/admin/user_groups.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/user_groups.py	Wed Jul 02 19:05:10 2014 -0400
@@ -138,11 +138,11 @@
             form_result = users_group_form.to_python(dict(request.POST))
             UserGroupModel().create(name=form_result['users_group_name'],
                                     description=form_result['user_group_description'],
-                                    owner=self.rhodecode_user.user_id,
+                                    owner=self.authuser.user_id,
                                     active=form_result['users_group_active'])
 
             gr = form_result['users_group_name']
-            action_logger(self.rhodecode_user,
+            action_logger(self.authuser,
                           'admin_created_users_group:%s' % gr,
                           None, self.ip_addr, self.sa)
             h.flash(_('Created user group %s') % gr, category='success')
@@ -191,7 +191,7 @@
             form_result = users_group_form.to_python(request.POST)
             UserGroupModel().update(c.user_group, form_result)
             gr = form_result['users_group_name']
-            action_logger(self.rhodecode_user,
+            action_logger(self.authuser,
                           'admin_updated_users_group:%s' % gr,
                           None, self.ip_addr, self.sa)
             h.flash(_('Updated user group %s') % gr, category='success')
@@ -309,7 +309,7 @@
             h.flash(_('Target group cannot be the same'), category='error')
             return redirect(url('edit_user_group_perms', id=id))
         #TODO: implement this
-        #action_logger(self.rhodecode_user, 'admin_changed_repo_permissions',
+        #action_logger(self.authuser, 'admin_changed_repo_permissions',
         #              repo_name, self.ip_addr, self.sa)
         Session().commit()
         h.flash(_('User Group permissions updated'), category='success')
@@ -330,8 +330,8 @@
             elif obj_type == 'user_group':
                 obj_id = safe_int(request.POST.get('user_group_id'))
 
-            if not c.rhodecode_user.is_admin:
-                if obj_type == 'user' and c.rhodecode_user.user_id == obj_id:
+            if not c.authuser.is_admin:
+                if obj_type == 'user' and c.authuser.user_id == obj_id:
                     msg = _('Cannot revoke permission for yourself as admin')
                     h.flash(msg, category='warning')
                     raise Exception('revoke admin permission on self')
--- a/kallithea/controllers/admin/users.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/admin/users.py	Wed Jul 02 19:05:10 2014 -0400
@@ -128,7 +128,7 @@
             form_result = user_form.to_python(dict(request.POST))
             user_model.create(form_result)
             usr = form_result['username']
-            action_logger(self.rhodecode_user, 'admin_created_user:%s' % usr,
+            action_logger(self.authuser, 'admin_created_user:%s' % usr,
                           None, self.ip_addr, self.sa)
             h.flash(_('Created user %s') % usr,
                     category='success')
@@ -181,7 +181,7 @@
 
             user_model.update(id, form_result, skip_attrs=skip_attrs)
             usr = form_result['username']
-            action_logger(self.rhodecode_user, 'admin_updated_user:%s' % usr,
+            action_logger(self.authuser, 'admin_updated_user:%s' % usr,
                           None, self.ip_addr, self.sa)
             h.flash(_('User updated successfully'), category='success')
             Session().commit()
--- a/kallithea/controllers/api/__init__.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/api/__init__.py	Wed Jul 02 19:05:10 2014 -0400
@@ -189,8 +189,8 @@
 
         # this is little trick to inject logged in user for
         # perms decorators to work they expect the controller class to have
-        # rhodecode_user attribute set
-        self.rhodecode_user = auth_u
+        # authuser attribute set
+        self.authuser = auth_u
 
         # This attribute will need to be first param of a method that uses
         # api_key, which is translated to instance of user at that name
--- a/kallithea/controllers/api/api.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/api/api.py	Wed Jul 02 19:05:10 2014 -0400
@@ -196,7 +196,7 @@
 
         try:
             ScmModel().pull_changes(repo.repo_name,
-                                    self.rhodecode_user.username)
+                                    self.authuser.username)
             return dict(
                 msg='Pulled from `%s`' % repo.repo_name,
                 repository=repo.repo_name
--- a/kallithea/controllers/changeset.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/changeset.py	Wed Jul 02 19:05:10 2014 -0400
@@ -356,7 +356,7 @@
         c.co = comm = ChangesetCommentsModel().create(
             text=text,
             repo=c.db_repo.repo_id,
-            user=c.rhodecode_user.user_id,
+            user=c.authuser.user_id,
             revision=revision,
             f_path=request.POST.get('f_path'),
             line_no=request.POST.get('line'),
@@ -374,7 +374,7 @@
                 ChangesetStatusModel().set_status(
                     c.db_repo.repo_id,
                     status,
-                    c.rhodecode_user.user_id,
+                    c.authuser.user_id,
                     comm,
                     revision=revision,
                     dont_allow_on_closed_pull_request=True
@@ -386,7 +386,7 @@
                 h.flash(msg, category='warning')
                 return redirect(h.url('changeset_home', repo_name=repo_name,
                                       revision=revision))
-        action_logger(self.rhodecode_user,
+        action_logger(self.authuser,
                       'user_commented_revision:%s' % revision,
                       c.db_repo, self.ip_addr, self.sa)
 
@@ -425,7 +425,7 @@
     @jsonify
     def delete_comment(self, repo_name, comment_id):
         co = ChangesetComment.get(comment_id)
-        owner = co.author.user_id == c.rhodecode_user.user_id
+        owner = co.author.user_id == c.authuser.user_id
         repo_admin = h.HasRepoPermissionAny('repository.admin')
         if h.HasPermissionAny('hg.admin')() or repo_admin or owner:
             ChangesetCommentsModel().delete(comment=co)
--- a/kallithea/controllers/files.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/files.py	Wed Jul 02 19:05:10 2014 -0400
@@ -322,7 +322,7 @@
         c.default_message = _('Deleted file %s via RhodeCode') % (f_path)
         c.f_path = f_path
         node_path = f_path
-        author = self.rhodecode_user.full_contact
+        author = self.authuser.full_contact
 
         if r_post:
             message = r_post.get('message') or c.default_message
@@ -334,7 +334,7 @@
                     }
                 }
                 self.scm_model.delete_nodes(
-                    user=c.rhodecode_user.user_id, repo=c.db_repo,
+                    user=c.authuser.user_id, repo=c.db_repo,
                     message=message,
                     nodes=nodes,
                     parent_cs=c.cs,
@@ -395,7 +395,7 @@
             content = convert_line_endings(r_post.get('content', ''), mode)
 
             message = r_post.get('message') or c.default_message
-            author = self.rhodecode_user.full_contact
+            author = self.authuser.full_contact
 
             if content == old_content:
                 h.flash(_('No changes'), category='warning')
@@ -404,7 +404,7 @@
             try:
                 self.scm_model.commit_change(repo=c.db_repo_scm_instance,
                                              repo_name=repo_name, cs=c.cs,
-                                             user=self.rhodecode_user.user_id,
+                                             user=self.authuser.user_id,
                                              author=author, message=message,
                                              content=content, f_path=f_path)
                 h.flash(_('Successfully committed to %s') % f_path,
@@ -466,7 +466,7 @@
             #strip all crap out of file, just leave the basename
             filename = os.path.basename(filename)
             node_path = os.path.join(location, filename)
-            author = self.rhodecode_user.full_contact
+            author = self.authuser.full_contact
 
             try:
                 nodes = {
@@ -475,7 +475,7 @@
                     }
                 }
                 self.scm_model.create_nodes(
-                    user=c.rhodecode_user.user_id, repo=c.db_repo,
+                    user=c.authuser.user_id, repo=c.db_repo,
                     message=message,
                     nodes=nodes,
                     parent_cs=c.cs,
@@ -586,7 +586,7 @@
                     break
                 yield data
         # store download action
-        action_logger(user=c.rhodecode_user,
+        action_logger(user=c.authuser,
                       action='user_downloaded_archive:%s' % (archive_name),
                       repo=repo_name, ipaddr=self.ip_addr, commit=True)
         response.content_disposition = str('attachment; filename=%s' % (archive_name))
--- a/kallithea/controllers/forks.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/forks.py	Wed Jul 02 19:05:10 2014 -0400
@@ -172,7 +172,7 @@
 
             # create fork is done sometimes async on celery, db transaction
             # management is handled there.
-            task = RepoModel().create_fork(form_result, self.rhodecode_user.user_id)
+            task = RepoModel().create_fork(form_result, self.authuser.user_id)
             from celery.result import BaseAsyncResult
             if isinstance(task, BaseAsyncResult):
                 task_id = task.task_id
--- a/kallithea/controllers/journal.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/journal.py	Wed Jul 02 19:05:10 2014 -0400
@@ -196,9 +196,9 @@
     def index(self):
         # Return a rendered template
         p = safe_int(request.GET.get('page', 1), 1)
-        c.user = User.get(self.rhodecode_user.user_id)
+        c.user = User.get(self.authuser.user_id)
         c.following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
 
@@ -216,7 +216,7 @@
 
         repos_list = Session().query(Repository)\
                      .filter(Repository.user_id ==
-                             self.rhodecode_user.user_id)\
+                             self.authuser.user_id)\
                      .order_by(func.lower(Repository.repo_name)).all()
 
         repos_data = RepoModel().get_repos_as_dict(repos_list=repos_list,
@@ -288,7 +288,7 @@
         Produce an atom-1.0 feed via feedgenerator module
         """
         following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
         return self._atom_feed(following, public=False)
@@ -300,7 +300,7 @@
         Produce an rss feed via feedgenerator module
         """
         following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
         return self._rss_feed(following, public=False)
@@ -316,7 +316,7 @@
             if user_id:
                 try:
                     self.scm_model.toggle_following_user(user_id,
-                                                self.rhodecode_user.user_id)
+                                                self.authuser.user_id)
                     Session.commit()
                     return 'ok'
                 except Exception:
@@ -326,7 +326,7 @@
             if repo_id:
                 try:
                     self.scm_model.toggle_following_repo(repo_id,
-                                                self.rhodecode_user.user_id)
+                                                self.authuser.user_id)
                     Session.commit()
                     return 'ok'
                 except Exception:
@@ -341,7 +341,7 @@
         p = safe_int(request.GET.get('page', 1), 1)
 
         c.following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
 
@@ -362,7 +362,7 @@
         Produce an atom-1.0 feed via feedgenerator module
         """
         c.following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
 
@@ -374,7 +374,7 @@
         Produce an rss2 feed via feedgenerator module
         """
         c.following = self.sa.query(UserFollowing)\
-            .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\
+            .filter(UserFollowing.user_id == self.authuser.user_id)\
             .options(joinedload(UserFollowing.follows_repository))\
             .all()
 
--- a/kallithea/controllers/login.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/login.py	Wed Jul 02 19:05:10 2014 -0400
@@ -59,7 +59,7 @@
         auth_user = AuthUser(user.user_id)
         auth_user.set_authenticated()
         cs = auth_user.get_cookie_store()
-        session['rhodecode_user'] = cs
+        session['authuser'] = cs
         user.update_lastlogin()
         Session().commit()
 
@@ -105,11 +105,11 @@
         came_from = self._validate_came_from(request.GET.get('came_from'))
         c.came_from = came_from or _default_came_from
 
-        not_default = self.rhodecode_user.username != User.DEFAULT_USER
-        ip_allowed = self.rhodecode_user.ip_allowed
+        not_default = self.authuser.username != User.DEFAULT_USER
+        ip_allowed = self.authuser.ip_allowed
 
         # redirect if already logged in
-        if self.rhodecode_user.is_authenticated and not_default and ip_allowed:
+        if self.authuser.is_authenticated and not_default and ip_allowed:
             raise HTTPFound(location=c.came_from)
 
         if request.POST:
--- a/kallithea/controllers/pullrequests.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/pullrequests.py	Wed Jul 02 19:05:10 2014 -0400
@@ -161,10 +161,10 @@
         return [g for g in groups if g[0]], selected
 
     def _get_is_allowed_change_status(self, pull_request):
-        owner = self.rhodecode_user.user_id == pull_request.user_id
-        reviewer = self.rhodecode_user.user_id in [x.user_id for x in
+        owner = self.authuser.user_id == pull_request.user_id
+        reviewer = self.authuser.user_id in [x.user_id for x in
                                                    pull_request.reviewers]
-        return self.rhodecode_user.admin or owner or reviewer
+        return self.authuser.admin or owner or reviewer
 
     def _load_compare_data(self, pull_request, enable_comments=True):
         """
@@ -345,7 +345,7 @@
         description = _form['pullrequest_desc']
         try:
             pull_request = PullRequestModel().create(
-                self.rhodecode_user.user_id, org_repo, org_ref, other_repo,
+                self.authuser.user_id, org_repo, org_ref, other_repo,
                 other_ref, revisions, reviewers, title, description
             )
             Session().commit()
@@ -370,7 +370,7 @@
         if pull_request.is_closed():
             raise HTTPForbidden()
         #only owner or admin can update it
-        owner = pull_request.author.user_id == c.rhodecode_user.user_id
+        owner = pull_request.author.user_id == c.authuser.user_id
         repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name)
         if h.HasPermissionAny('hg.admin') or repo_admin or owner:
             reviewers_ids = map(int, filter(lambda v: v not in [None, ''],
@@ -389,7 +389,7 @@
     def delete(self, repo_name, pull_request_id):
         pull_request = PullRequest.get_or_404(pull_request_id)
         #only owner can delete it !
-        if pull_request.author.user_id == c.rhodecode_user.user_id:
+        if pull_request.author.user_id == c.authuser.user_id:
             PullRequestModel().delete(pull_request)
             Session().commit()
             h.flash(_('Successfully deleted pull request'),
@@ -485,7 +485,7 @@
         comm = ChangesetCommentsModel().create(
             text=text,
             repo=c.db_repo.repo_id,
-            user=c.rhodecode_user.user_id,
+            user=c.authuser.user_id,
             pull_request=pull_request_id,
             f_path=request.POST.get('f_path'),
             line_no=request.POST.get('line'),
@@ -495,7 +495,7 @@
             closing_pr=close_pr
         )
 
-        action_logger(self.rhodecode_user,
+        action_logger(self.authuser,
                       'user_commented_pull_request:%s' % pull_request_id,
                       c.db_repo, self.ip_addr, self.sa)
 
@@ -505,7 +505,7 @@
                 ChangesetStatusModel().set_status(
                     c.db_repo.repo_id,
                     status,
-                    c.rhodecode_user.user_id,
+                    c.authuser.user_id,
                     comm,
                     pull_request=pull_request_id
                 )
@@ -513,7 +513,7 @@
             if close_pr:
                 if status in ['rejected', 'approved']:
                     PullRequestModel().close_pull_request(pull_request_id)
-                    action_logger(self.rhodecode_user,
+                    action_logger(self.authuser,
                               'user_closed_pull_request:%s' % pull_request_id,
                               c.db_repo, self.ip_addr, self.sa)
                 else:
@@ -549,7 +549,7 @@
             #don't allow deleting comments on closed pull request
             raise HTTPForbidden()
 
-        owner = co.author.user_id == c.rhodecode_user.user_id
+        owner = co.author.user_id == c.authuser.user_id
         repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name)
         if h.HasPermissionAny('hg.admin') or repo_admin or owner:
             ChangesetCommentsModel().delete(comment=co)
--- a/kallithea/controllers/summary.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/controllers/summary.py	Wed Jul 02 19:05:10 2014 -0400
@@ -136,8 +136,8 @@
         _load_changelog_summary()
 
         username = ''
-        if self.rhodecode_user.username != User.DEFAULT_USER:
-            username = safe_str(self.rhodecode_user.username)
+        if self.authuser.username != User.DEFAULT_USER:
+            username = safe_str(self.authuser.username)
 
         _def_clone_uri = _def_clone_uri_by_id = c.clone_uri_tmpl
         if '{repo}' in _def_clone_uri:
--- a/kallithea/lib/auth.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/lib/auth.py	Wed Jul 02 19:05:10 2014 -0400
@@ -736,7 +736,7 @@
 
     def __wrapper(self, func, *fargs, **fkwargs):
         cls = fargs[0]
-        user = cls.rhodecode_user
+        user = cls.authuser
         loc = "%s:%s" % (cls.__class__.__name__, func.__name__)
 
         # check if our IP is allowed
@@ -794,7 +794,7 @@
 
     def __wrapper(self, func, *fargs, **fkwargs):
         cls = fargs[0]
-        self.user = cls.rhodecode_user
+        self.user = cls.authuser
 
         log.debug('Checking if user is not anonymous @%s' % cls)
 
@@ -824,7 +824,7 @@
 
     def __wrapper(self, func, *fargs, **fkwargs):
         cls = fargs[0]
-        self.user = cls.rhodecode_user
+        self.user = cls.authuser
         self.user_perms = self.user.permissions
         log.debug('checking %s permissions %s for %s %s',
            self.__class__.__name__, self.required_perms, cls, self.user)
--- a/kallithea/lib/base.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/lib/base.py	Wed Jul 02 19:05:10 2014 -0400
@@ -314,7 +314,7 @@
         c.repo_name = get_repo_slug(request)  # can be empty
         c.backends = BACKENDS.keys()
         c.unread_notifications = NotificationModel()\
-                        .get_unread_cnt_for_user(c.rhodecode_user.user_id)
+                        .get_unread_cnt_for_user(c.authuser.user_id)
 
         self.cut_off_limit = safe_int(config.get('cut_off_limit'))
         self.sa = meta.Session
@@ -335,7 +335,7 @@
                 auth_user = AuthUser(api_key=api_key, ip_addr=self.ip_addr)
                 authenticated = False
             else:
-                cookie_store = CookieStoreWrapper(session.get('rhodecode_user'))
+                cookie_store = CookieStoreWrapper(session.get('authuser'))
                 try:
                     auth_user = AuthUser(user_id=cookie_store.get('user_id', None),
                                          ip_addr=self.ip_addr)
@@ -355,7 +355,7 @@
                 auth_user.set_authenticated(authenticated)
             request.user = auth_user
             #set globals for auth user
-            self.rhodecode_user = c.rhodecode_user = auth_user
+            self.authuser = c.authuser = auth_user
             log.info('IP: %s User: %s accessed %s' % (
                self.ip_addr, auth_user, safe_unicode(_get_access_path(environ)))
             )
@@ -413,4 +413,4 @@
             c.repository_forks = self.scm_model.get_forks(dbr)
             c.repository_pull_requests = self.scm_model.get_pull_requests(dbr)
             c.repository_following = self.scm_model.is_following_repo(
-                                    c.repo_name, self.rhodecode_user.user_id)
+                                    c.repo_name, self.authuser.user_id)
--- a/kallithea/lib/utils.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/lib/utils.py	Wed Jul 02 19:05:10 2014 -0400
@@ -56,7 +56,7 @@
     UserLog, RepoGroup, RhodeCodeSetting, CacheInvalidation, UserGroup
 from kallithea.model.meta import Session
 from kallithea.model.repo_group import RepoGroupModel
-from kallithea.lib.utils2 import safe_str, safe_unicode, get_current_rhodecode_user
+from kallithea.lib.utils2 import safe_str, safe_unicode, get_current_authuser
 from kallithea.lib.vcs.utils.fakemod import create_module
 from kallithea.model.user_group import UserGroupModel
 
@@ -178,7 +178,7 @@
     # if we don't get explicit IP address try to get one from registered user
     # in tmpl context var
     if not ipaddr:
-        ipaddr = getattr(get_current_rhodecode_user(), 'ip_addr', '')
+        ipaddr = getattr(get_current_authuser(), 'ip_addr', '')
 
     try:
         if getattr(user, 'user_id', None):
--- a/kallithea/lib/utils2.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/lib/utils2.py	Wed Jul 02 19:05:10 2014 -0400
@@ -671,14 +671,14 @@
     return "".join(output)[:truncate_to]
 
 
-def get_current_rhodecode_user():
+def get_current_authuser():
     """
     Gets rhodecode user from threadlocal tmpl_context variable if it's
     defined, else returns None.
     """
     from pylons import tmpl_context
-    if hasattr(tmpl_context, 'rhodecode_user'):
-        return tmpl_context.rhodecode_user
+    if hasattr(tmpl_context, 'authuser'):
+        return tmpl_context.authuser
 
     return None
 
--- a/kallithea/model/repo.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/model/repo.py	Wed Jul 02 19:05:10 2014 -0400
@@ -35,7 +35,7 @@
 from kallithea.lib.vcs.backends import get_backend
 from kallithea.lib.compat import json
 from kallithea.lib.utils2 import LazyProperty, safe_str, safe_unicode, \
-    remove_prefix, obfuscate_url_pw, get_current_rhodecode_user
+    remove_prefix, obfuscate_url_pw, get_current_authuser
 from kallithea.lib.caching_query import FromCache
 from kallithea.lib.hooks import log_create_repository, log_delete_repository
 
@@ -537,7 +537,7 @@
         :param fs_remove: remove(archive) repo from filesystem
         """
         if not cur_user:
-            cur_user = getattr(get_current_rhodecode_user(), 'username', None)
+            cur_user = getattr(get_current_authuser(), 'username', None)
         repo = self._get_repo(repo)
         if repo:
             if forks == 'detach':
--- a/kallithea/model/user.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/model/user.py	Wed Jul 02 19:05:10 2014 -0400
@@ -32,7 +32,7 @@
 from sqlalchemy.exc import DatabaseError
 
 
-from kallithea.lib.utils2 import safe_unicode, generate_api_key, get_current_rhodecode_user
+from kallithea.lib.utils2 import safe_unicode, generate_api_key, get_current_authuser
 from kallithea.lib.caching_query import FromCache
 from kallithea.model import BaseModel
 from kallithea.model.db import User, UserToPerm, Notification, \
@@ -78,7 +78,7 @@
 
     def create(self, form_data, cur_user=None):
         if not cur_user:
-            cur_user = getattr(get_current_rhodecode_user(), 'username', None)
+            cur_user = getattr(get_current_authuser(), 'username', None)
 
         from kallithea.lib.hooks import log_create_user, check_allowed_create_user
         _fd = form_data
@@ -127,7 +127,7 @@
         :param cur_user:
         """
         if not cur_user:
-            cur_user = getattr(get_current_rhodecode_user(), 'username', None)
+            cur_user = getattr(get_current_authuser(), 'username', None)
 
         from kallithea.lib.auth import get_crypt_password, check_password
         from kallithea.lib.hooks import log_create_user, check_allowed_create_user
@@ -259,7 +259,7 @@
 
     def delete(self, user, cur_user=None):
         if not cur_user:
-            cur_user = getattr(get_current_rhodecode_user(), 'username', None)
+            cur_user = getattr(get_current_authuser(), 'username', None)
         user = self._get_user(user)
 
         try:
--- a/kallithea/templates/admin/gists/edit.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/gists/edit.html	Wed Jul 02 19:05:10 2014 -0400
@@ -51,7 +51,7 @@
           ${h.form(h.url('edit_gist', gist_id=c.gist.gist_access_id), method='post', id='eform')}
             <div>
                 <div class="gravatar">
-                   <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.rhodecode_user.full_contact),32)}"/>
+                   <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.authuser.full_contact),32)}"/>
                 </div>
                 <input type="hidden" value="${c.file_changeset.raw_id}" name="parent_hash">
                 <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;"
--- a/kallithea/templates/admin/gists/index.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/gists/index.html	Wed Jul 02 19:05:10 2014 -0400
@@ -3,9 +3,9 @@
 
 <%def name="title()">
     %if c.show_private:
-        ${_('Private Gists for user %s') % c.rhodecode_user.username}
+        ${_('Private Gists for user %s') % c.authuser.username}
     %elif c.show_public:
-        ${_('Public Gists for user %s') % c.rhodecode_user.username}
+        ${_('Public Gists for user %s') % c.authuser.username}
     %else:
         ${_('Public Gists')}
     %endif
@@ -16,9 +16,9 @@
 
 <%def name="breadcrumbs_links()">
     %if c.show_private:
-        ${_('Private Gists for user %s') % c.rhodecode_user.username}
+        ${_('Private Gists for user %s') % c.authuser.username}
     %elif c.show_public:
-        ${_('Public Gists for user %s') % c.rhodecode_user.username}
+        ${_('Public Gists for user %s') % c.authuser.username}
     %else:
         ${_('Public Gists')}
     %endif
@@ -34,7 +34,7 @@
     <!-- box / title -->
     <div class="title">
         ${self.breadcrumbs()}
-        %if c.rhodecode_user.username != 'default':
+        %if c.authuser.username != 'default':
         <ul class="links">
           <li>
              <a href="${h.url('new_gist')}" class="btn btn-small btn-success"><i class="icon-plus"></i> ${_(u'Create New Gist')}</a>
--- a/kallithea/templates/admin/gists/new.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/gists/new.html	Wed Jul 02 19:05:10 2014 -0400
@@ -38,7 +38,7 @@
           ${h.form(h.url('gists'), method='post',id='eform')}
             <div>
                 <div class="gravatar">
-                   <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.rhodecode_user.full_contact),32)}"/>
+                   <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.authuser.full_contact),32)}"/>
                 </div>
                 <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
                 <div style="padding:0px 0px 0px 42px">
--- a/kallithea/templates/admin/gists/show.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/gists/show.html	Wed Jul 02 19:05:10 2014 -0400
@@ -22,7 +22,7 @@
     <!-- box / title -->
     <div class="title">
         ${self.breadcrumbs()}
-        %if c.rhodecode_user.username != 'default':
+        %if c.authuser.username != 'default':
         <ul class="links">
           <li>
               <a href="${h.url('new_gist')}" class="btn btn-small btn-success"><i class="icon-plus"></i> ${_(u'Create New Gist')}</a>
@@ -53,7 +53,7 @@
                          %endif
                        </div>
 
-                       %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
+                       %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.authuser.user_id:
                         <div style="float:right">
                             ${h.form(url('gist', gist_id=c.gist.gist_id),method='delete')}
                                 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
@@ -62,7 +62,7 @@
                        %endif
                         <div class="buttons">
                           ## only owner should see that
-                          %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
+                          %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.authuser.user_id:
                             ${h.link_to(_('Edit'),h.url('edit_gist', gist_id=c.gist.gist_access_id),class_="btn btn-mini")}
                           %endif
                           ${h.link_to(_('Show as Raw'),h.url('formatted_gist', gist_id=c.gist.gist_access_id, format='raw'),class_="btn btn-mini")}
--- a/kallithea/templates/admin/my_account/my_account.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/my_account/my_account.html	Wed Jul 02 19:05:10 2014 -0400
@@ -2,7 +2,7 @@
 <%inherit file="/base/base.html"/>
 
 <%def name="title()">
-    ${_('My account')} ${c.rhodecode_user.username}
+    ${_('My account')} ${c.authuser.username}
     %if c.rhodecode_name:
         &middot; ${c.rhodecode_name}
     %endif
--- a/kallithea/templates/admin/notifications/notifications.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/notifications/notifications.html	Wed Jul 02 19:05:10 2014 -0400
@@ -2,7 +2,7 @@
 <%inherit file="/base/base.html"/>
 
 <%def name="title()">
-    ${_('My Notifications')} ${c.rhodecode_user.username}
+    ${_('My Notifications')} ${c.authuser.username}
     %if c.rhodecode_name:
         &middot; ${c.rhodecode_name}
     %endif
--- a/kallithea/templates/admin/notifications/show_notification.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/notifications/show_notification.html	Wed Jul 02 19:05:10 2014 -0400
@@ -2,7 +2,7 @@
 <%inherit file="/base/base.html"/>
 
 <%def name="title()">
-    ${_('Show notification')} ${c.rhodecode_user.username}
+    ${_('Show notification')} ${c.authuser.username}
     %if c.rhodecode_name:
         &middot; ${c.rhodecode_name}
     %endif
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/repo_groups/repo_group_edit_perms.html	Wed Jul 02 19:05:10 2014 -0400
@@ -15,7 +15,7 @@
                 %for r2p in c.repo_group.repo_group_to_perm:
                     ##forbid revoking permission from yourself, except if you're an super admin
                     <tr id="id${id(r2p.user.username)}">
-                        %if c.rhodecode_user.user_id != r2p.user.user_id or c.rhodecode_user.is_admin:
+                        %if c.authuser.user_id != r2p.user.user_id or c.authuser.is_admin:
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'group.none')}</td>
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'group.read')}</td>
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'group.write')}</td>
--- a/kallithea/templates/admin/repos/repo_add.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/repos/repo_add.html	Wed Jul 02 19:05:10 2014 -0400
@@ -9,7 +9,7 @@
 </%def>
 
 <%def name="breadcrumbs_links()">
-    %if c.rhodecode_user.is_admin:
+    %if c.authuser.is_admin:
     ${h.link_to(_('Admin'),h.url('admin_home'))}
     &raquo;
     ${h.link_to(_('Repositories'),h.url('repos'))}
--- a/kallithea/templates/admin/repos/repo_add_base.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/repos/repo_add_base.html	Wed Jul 02 19:05:10 2014 -0400
@@ -13,7 +13,7 @@
                 <div style="margin: 6px 0px 0px 0px">
                     <a id="remote_clone_toggle" href="#"><i class="icon-download-alt"></i> ${_('Import existing repository ?')}</a>
                 </div>
-                %if not c.rhodecode_user.is_admin:
+                %if not c.authuser.is_admin:
                     ${h.hidden('user_created',True)}
                 %endif
             </div>
--- a/kallithea/templates/admin/user_groups/user_group_edit_perms.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/user_groups/user_group_edit_perms.html	Wed Jul 02 19:05:10 2014 -0400
@@ -15,7 +15,7 @@
                 %for r2p in c.user_group.user_user_group_to_perm:
                     ##forbid revoking permission from yourself, except if you're an super admin
                     <tr id="id${id(r2p.user.username)}">
-                        %if c.rhodecode_user.user_id != r2p.user.user_id or c.rhodecode_user.is_admin:
+                        %if c.authuser.user_id != r2p.user.user_id or c.authuser.is_admin:
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'usergroup.none')}</td>
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'usergroup.read')}</td>
                         <td>${h.radio('u_perm_%s' % r2p.user.username,'usergroup.write')}</td>
--- a/kallithea/templates/admin/users/user_edit_profile.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/admin/users/user_edit_profile.html	Wed Jul 02 19:05:10 2014 -0400
@@ -11,7 +11,7 @@
                 <strong>${_('Avatars are disabled')}</strong>
                 <br/>${c.user.email or _('Missing email, please update this user email address.')}
                         ##show current ip just if we show ourself
-                        %if c.rhodecode_user.username == c.user.username:
+                        %if c.authuser.username == c.user.username:
                             [${_('current IP')}: ${c.perm_user.ip_addr or "?"}]
                         %endif
                 %endif
--- a/kallithea/templates/base/base.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/base/base.html	Wed Jul 02 19:05:10 2014 -0400
@@ -178,7 +178,7 @@
               %endif
               ## TODO: this check feels wrong, it would be better to have a check for permissions
               ## also it feels like a job for the controller
-              %if c.rhodecode_user.username != 'default':
+              %if c.authuser.username != 'default':
                   <li>
                    <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.db_repo.repo_id},'${str(h.get_token())}');">
                     <span class="show-follow"><i class="icon-heart-empty"></i> ${_('Follow')}</span>
@@ -222,10 +222,10 @@
     <li>
       <a class="menu_link childs" id="quick_login_link">
           <span class="icon">
-             <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
+             <img src="${h.gravatar_url(c.authuser.email,20)}" alt="avatar">
           </span>
-          %if c.rhodecode_user.username != 'default':
-            <span class="menu_link_user">${c.rhodecode_user.username}</span>
+          %if c.authuser.username != 'default':
+            <span class="menu_link_user">${c.authuser.username}</span>
             %if c.unread_notifications != 0:
               <span class="menu_link_notifications">${c.unread_notifications}</span>
             %endif
@@ -236,7 +236,7 @@
 
   <div class="user-menu">
       <div id="quick_login">
-        %if c.rhodecode_user.username == 'default':
+        %if c.authuser.username == 'default':
             <h4>${_('Login to your account')}</h4>
             ${h.form(h.url('login_home',came_from=h.url.current()))}
             <div class="form">
@@ -275,9 +275,9 @@
             ${h.end_form()}
         %else:
             <div class="links_left">
-                <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
-                <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
-                <div class="email">${c.rhodecode_user.email}</div>
+                <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.authuser.email,48)}" /></div>
+                <div class="full_name">${c.authuser.full_name_or_username}</div>
+                <div class="email">${c.authuser.email}</div>
             </div>
             <div class="links_right">
             <ol class="links">
@@ -306,7 +306,7 @@
           </li>
 
           ##ROOT MENU
-          %if c.rhodecode_user.username != 'default':
+          %if c.authuser.username != 'default':
             <li ${is_current('journal')}>
               <a class="menu_link" title="${_('Show recent activity')}"  href="${h.url('journal')}">
                 <i class="icon-book"></i> ${_('Journal')}
@@ -326,7 +326,7 @@
                 <ul class="admin_menu">
                   <li><a href="${h.url('new_gist', public=1)}"><i class="icon-file-alt"></i> ${_('Create new gist')}</a></li>
                   <li><a href="${h.url('gists')}"><i class="icon-copy"></i> ${_('All public gists')}</a></li>
-                  %if c.rhodecode_user.username != 'default':
+                  %if c.authuser.username != 'default':
                     <li><a href="${h.url('gists', public=1)}"><i class="icon-copy"></i> ${_('My public gists')}</a></li>
                     <li><a href="${h.url('gists', private=1)}"><i class="icon-file-text"></i> ${_('My private gists')}</a></li>
                   %endif
@@ -344,14 +344,14 @@
               </a>
               ${admin_menu()}
             </li>
-          % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin:
+          % elif c.authuser.repositories_admin or c.authuser.repository_groups_admin or c.authuser.user_groups_admin:
           <li ${is_current('admin')}>
               <a class="menu_link childs" title="${_('Admin')}">
                 <i class="icon-cog"></i> ${_('Admin')}
               </a>
-              ${admin_menu_simple(c.rhodecode_user.repositories_admin,
-                                  c.rhodecode_user.repository_groups_admin,
-                                  c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
+              ${admin_menu_simple(c.authuser.repositories_admin,
+                                  c.authuser.repository_groups_admin,
+                                  c.authuser.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
           </li>
           % endif
           ${usermenu()}
--- a/kallithea/templates/changeset/changeset_file_comment.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/changeset/changeset_file_comment.html	Wed Jul 02 19:05:10 2014 -0400
@@ -44,7 +44,7 @@
         %endif
 
       <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
-      %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.rhodecode_user.user_id:
+      %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id:
           <div onClick="deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-mini">${_('Delete')}</div>
       %endif
       </div>
@@ -59,7 +59,7 @@
 <%def name="comment_inline_form()">
 <div id='comment-inline-form-template' style="display:none">
   <div class="comment-inline-form ac">
-  %if c.rhodecode_user.username != 'default':
+  %if c.authuser.username != 'default':
     <div class="overlay"><div class="overlay-text">${_('Submitting...')}</div></div>
       ${h.form('#', class_='inline-form')}
       <div id="edit-container_{1}" class="clearfix">
@@ -145,7 +145,7 @@
 <%def name="comments(post_url, cur_status, is_pr=False, change_status=True)">
 
 <div class="comments">
-    %if c.rhodecode_user.username != 'default':
+    %if c.authuser.username != 'default':
     <div class="comment-form ac">
         ${h.form(post_url)}
         <div id="edit-container" class="clearfix">
--- a/kallithea/templates/data_table/_dt_elements.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/data_table/_dt_elements.html	Wed Jul 02 19:05:10 2014 -0400
@@ -99,16 +99,16 @@
 </%def>
 
 <%def name="rss(name)">
-  %if c.rhodecode_user.username != 'default':
-    <a title="${_('Subscribe to %s rss feed')% name}" href="${h.url('rss_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
+  %if c.authuser.username != 'default':
+    <a title="${_('Subscribe to %s rss feed')% name}" href="${h.url('rss_feed_home',repo_name=name,api_key=c.authuser.api_key)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
   %else:
     <a title="${_('Subscribe to %s rss feed')% name}" href="${h.url('rss_feed_home',repo_name=name)}"><i class="icon-rss-sign" style="color: #fa9b39"></i></a>
   %endif
 </%def>
 
 <%def name="atom(name)">
-  %if c.rhodecode_user.username != 'default':
-    <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign"  style="color: #fa9b39"></i></a>
+  %if c.authuser.username != 'default':
+    <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name,api_key=c.authuser.api_key)}"><i class="icon-rss-sign"  style="color: #fa9b39"></i></a>
   %else:
     <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name)}"><i class="icon-rss-sign"  style="color: #fa9b39"></i></a>
   %endif
--- a/kallithea/templates/index_base.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/index_base.html	Wed Jul 02 19:05:10 2014 -0400
@@ -5,7 +5,7 @@
             <h5>
             <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
             </h5>
-            %if c.rhodecode_user.username != 'default':
+            %if c.authuser.username != 'default':
               <ul class="links">
                 <li>
                 <%
--- a/kallithea/templates/journal/journal.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/journal/journal.html	Wed Jul 02 19:05:10 2014 -0400
@@ -21,8 +21,8 @@
     ${self.menu('journal')}
 </%def>
 <%def name="head_extra()">
-<link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
-<link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
+<link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
+<link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
 </%def>
 <%def name="main()">
 
@@ -35,7 +35,7 @@
              <span><a id="refresh" href="${h.url('journal')}"><i class="icon-refresh"></i></a></span>
            </li>
            <li>
-             <span><a href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign"></i></a></span>
+             <span><a href="${h.url('journal_atom', api_key=c.authuser.api_key)}"><i class="icon-rss-sign"></i></a></span>
            </li>
          </ul>
         </div>
--- a/kallithea/templates/pullrequests/pullrequest_show.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/pullrequests/pullrequest_show.html	Wed Jul 02 19:05:10 2014 -0400
@@ -115,7 +115,7 @@
                   <div class="reviewer_gravatar gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
                   <div style="float:left;">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div>
                   <input type="hidden" value="${member.user_id}" name="review_members" />
-                  %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.user_id == c.rhodecode_user.user_id):
+                  %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.user_id == c.authuser.user_id):
                   <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id})">
                       <i class="icon-remove-sign" style="color: #FF4444;"></i>
                   </div>
@@ -127,7 +127,7 @@
           </div>
           %if not c.pull_request.is_closed():
           <div class='ac'>
-            %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.author.user_id == c.rhodecode_user.user_id:
+            %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.author.user_id == c.authuser.user_id:
             <div class="reviewer_ac">
                ${h.text('user', class_='yui-ac-input')}
                <span class="help-block">${_('Add or remove reviewer to this pull request.')}</span>
--- a/kallithea/templates/pullrequests/pullrequest_show_all.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/pullrequests/pullrequest_show_all.html	Wed Jul 02 19:05:10 2014 -0400
@@ -28,7 +28,7 @@
         ${self.breadcrumbs()}
         <ul class="links">
           <li>
-             %if c.rhodecode_user.username != 'default':
+             %if c.authuser.username != 'default':
               <span>
                   <a id="open_new_pr" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-plus"></i> ${_('Open new pull request')}</a>
               </span>
--- a/kallithea/templates/summary/statistics.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/summary/statistics.html	Wed Jul 02 19:05:10 2014 -0400
@@ -16,8 +16,8 @@
 </%def>
 
 <%def name="head_extra()">
-<link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
-<link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
+<link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
+<link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 </%def>
 
 <%def name="main()">
--- a/kallithea/templates/summary/summary.html	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/templates/summary/summary.html	Wed Jul 02 19:05:10 2014 -0400
@@ -39,8 +39,8 @@
 </%def>
 
 <%def name="head_extra()">
-<link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
-<link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
+<link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
+<link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 
 <script>
 redirect_hash_branch = function(){
@@ -158,7 +158,7 @@
               </a>
             </li>
 
-            %if c.rhodecode_user.username != 'default':
+            %if c.authuser.username != 'default':
             <li class="repo_size">
               <a href="#" onclick="javascript:showRepoSize('repo_size_2','${c.db_repo.repo_name}','${str(h.get_token())}')"><i class="icon-archive"></i> ${_('Repository Size')}</a>
               <span  class="stats-bullet" id="repo_size_2"></span>
@@ -166,8 +166,8 @@
             %endif
 
             <li>
-            %if c.rhodecode_user.username != 'default':
-              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign"></i> ${_('Feed')}</a>
+            %if c.authuser.username != 'default':
+              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}"><i class="icon-rss-sign"></i> ${_('Feed')}</a>
             %else:
               <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name)}"><i class="icon-rss-sign"></i> ${_('Feed')}</a>
             %endif
--- a/kallithea/tests/__init__.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/tests/__init__.py	Wed Jul 02 19:05:10 2014 -0400
@@ -198,12 +198,12 @@
             self.fail('could not login using %s %s' % (username, password))
 
         self.assertEqual(response.status, '302 Found')
-        ses = response.session['rhodecode_user']
+        ses = response.session['authuser']
         self.assertEqual(ses.get('username'), username)
         response = response.follow()
         self.assertEqual(ses.get('is_authenticated'), True)
 
-        return response.session['rhodecode_user']
+        return response.session['authuser']
 
     def _get_logged_user(self):
         return User.get_by_username(self._logged_username)
--- a/kallithea/tests/functional/test_login.py	Wed Jul 02 19:05:00 2014 -0400
+++ b/kallithea/tests/functional/test_login.py	Wed Jul 02 19:05:10 2014 -0400
@@ -33,7 +33,7 @@
                                  {'username': 'test_admin',
                                   'password': 'test12'})
         self.assertEqual(response.status, '302 Found')
-        self.assertEqual(response.session['rhodecode_user'].get('username'),
+        self.assertEqual(response.session['authuser'].get('username'),
                          'test_admin')
         response = response.follow()
         response.mustcontain('/%s' % HG_REPO)
@@ -44,7 +44,7 @@
                                   'password': 'test12'})
 
         self.assertEqual(response.status, '302 Found')
-        self.assertEqual(response.session['rhodecode_user'].get('username'),
+        self.assertEqual(response.session['authuser'].get('username'),
                          'test_regular')
         response = response.follow()
         response.mustcontain('/%s' % HG_REPO)