Show More
@@ -515,7 +515,7 b' class RepoModel(BaseModel):' | |||
|
515 | 515 | :param fs_remove: remove(archive) repo from filesystem |
|
516 | 516 | """ |
|
517 | 517 | if not cur_user: |
|
518 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
518 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
519 | 519 | repo = self._get_repo(repo) |
|
520 | 520 | if repo: |
|
521 | 521 | if forks == 'detach': |
@@ -83,7 +83,7 b' class UserModel(BaseModel):' | |||
|
83 | 83 | |
|
84 | 84 | def create(self, form_data, cur_user=None): |
|
85 | 85 | if not cur_user: |
|
86 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
86 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
87 | 87 | from rhodecode.lib.auth import get_crypt_password |
|
88 | 88 | try: |
|
89 | 89 | new_user = User() |
@@ -120,7 +120,7 b' class UserModel(BaseModel):' | |||
|
120 | 120 | :param ldap_dn: |
|
121 | 121 | """ |
|
122 | 122 | if not cur_user: |
|
123 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
123 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
124 | 124 | |
|
125 | 125 | from rhodecode.lib.auth import get_crypt_password |
|
126 | 126 | |
@@ -165,7 +165,7 b' class UserModel(BaseModel):' | |||
|
165 | 165 | :param attrs: |
|
166 | 166 | """ |
|
167 | 167 | if not cur_user: |
|
168 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
168 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
169 | 169 | if self.get_by_username(username, case_insensitive=True) is None: |
|
170 | 170 | |
|
171 | 171 | # autogenerate email for container account without one |
@@ -205,7 +205,7 b' class UserModel(BaseModel):' | |||
|
205 | 205 | :param attrs: |
|
206 | 206 | """ |
|
207 | 207 | if not cur_user: |
|
208 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
208 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
209 | 209 | from rhodecode.lib.auth import get_crypt_password |
|
210 | 210 | log.debug('Checking for such ldap account in RhodeCode database') |
|
211 | 211 | if self.get_by_username(username, case_insensitive=True) is None: |
@@ -317,7 +317,7 b' class UserModel(BaseModel):' | |||
|
317 | 317 | |
|
318 | 318 | def delete(self, user, cur_user=None): |
|
319 | 319 | if not cur_user: |
|
320 |
cur_user = getattr(get_current_rhodecode_user(), 'username', |
|
|
320 | cur_user = getattr(get_current_rhodecode_user(), 'username', None) | |
|
321 | 321 | user = self._get_user(user) |
|
322 | 322 | |
|
323 | 323 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now