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