Changeset - fa637dc3e029
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-03-22 00:45:58
marcin@python-works.com
Improved message about deleting user who owns repositories
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/user.py
Show inline comments
 
@@ -299,14 +299,15 @@ class UserModel(BaseModel):
 
        try:
 
            if user.username == 'default':
 
                raise DefaultUserException(
 
                    _("You can't remove this user since it's"
 
                    _(u"You can't remove this user since it's"
 
                      " crucial for entire application")
 
                )
 
            if user.repositories:
 
                repos = [x.repo_name for x in user.repositories]
 
                raise UserOwnsReposException(
 
                    _('user "%s" still owns %s repositories and cannot be '
 
                      'removed. Switch owners or remove those repositories')
 
                    % (user.username, user.repositories)
 
                    _(u'user "%s" still owns %s repositories and cannot be '
 
                      'removed. Switch owners or remove those repositories. %s')
 
                    % (user.username, len(repos), ', '.join(repos))
 
                )
 
            self.sa.delete(user)
 
        except:
0 comments (0 inline, 0 general)