Mercurial > kallithea
comparison kallithea/model/repo.py @ 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 | d1addaf7a91e |
children | 9daad8c50b37 |
comparison
equal
deleted
inserted
replaced
4196:06e49be38d78 | 4197:d208416c84c6 |
---|---|
33 from kallithea.lib.utils import make_ui | 33 from kallithea.lib.utils import make_ui |
34 | 34 |
35 from kallithea.lib.vcs.backends import get_backend | 35 from kallithea.lib.vcs.backends import get_backend |
36 from kallithea.lib.compat import json | 36 from kallithea.lib.compat import json |
37 from kallithea.lib.utils2 import LazyProperty, safe_str, safe_unicode, \ | 37 from kallithea.lib.utils2 import LazyProperty, safe_str, safe_unicode, \ |
38 remove_prefix, obfuscate_url_pw, get_current_rhodecode_user | 38 remove_prefix, obfuscate_url_pw, get_current_authuser |
39 from kallithea.lib.caching_query import FromCache | 39 from kallithea.lib.caching_query import FromCache |
40 from kallithea.lib.hooks import log_create_repository, log_delete_repository | 40 from kallithea.lib.hooks import log_create_repository, log_delete_repository |
41 | 41 |
42 from kallithea.model import BaseModel | 42 from kallithea.model import BaseModel |
43 from kallithea.model.db import Repository, UserRepoToPerm, UserGroupRepoToPerm, \ | 43 from kallithea.model.db import Repository, UserRepoToPerm, UserGroupRepoToPerm, \ |
535 :param repo: | 535 :param repo: |
536 :param forks: str 'delete' or 'detach' | 536 :param forks: str 'delete' or 'detach' |
537 :param fs_remove: remove(archive) repo from filesystem | 537 :param fs_remove: remove(archive) repo from filesystem |
538 """ | 538 """ |
539 if not cur_user: | 539 if not cur_user: |
540 cur_user = getattr(get_current_rhodecode_user(), 'username', None) | 540 cur_user = getattr(get_current_authuser(), 'username', None) |
541 repo = self._get_repo(repo) | 541 repo = self._get_repo(repo) |
542 if repo: | 542 if repo: |
543 if forks == 'detach': | 543 if forks == 'detach': |
544 for r in repo.forks: | 544 for r in repo.forks: |
545 r.fork = None | 545 r.fork = None |