Mercurial > kallithea
diff rhodecode/controllers/admin/users.py @ 4074:3b136af34329
Added pre-create user hook.
It allows to control user creation using rcext hooks.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 01 Jul 2013 16:10:22 +0200 |
parents | 5293d4bbb1ea |
children | ffd45b185016 |
line wrap: on
line diff
--- a/rhodecode/controllers/admin/users.py Mon Jul 01 15:39:01 2013 +0200 +++ b/rhodecode/controllers/admin/users.py Mon Jul 01 16:10:22 2013 +0200 @@ -35,7 +35,7 @@ import rhodecode from rhodecode.lib.exceptions import DefaultUserException, \ - UserOwnsReposException + UserOwnsReposException, UserCreationError from rhodecode.lib import helpers as h from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \ AuthUser @@ -137,6 +137,8 @@ errors=errors.error_dict or {}, prefix_error=False, encoding="UTF-8") + except UserCreationError, e: + h.flash(e, 'error') except Exception: log.error(traceback.format_exc()) h.flash(_('Error occurred during creation of user %s') \