Show More
@@ -1,7 +1,7 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 |
|
|
3 | rhodecode.controllers.admin.admin | |
4 | ~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 |
|
5 | |||
6 | Controller for Admin panel of Rhodecode |
|
6 | Controller for Admin panel of Rhodecode | |
7 |
|
7 |
@@ -1,7 +1,8 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 |
|
|
3 | rhodecode.controllers.admin.permissions | |
4 | ~~~~~~~~~~~~~~ |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
|
5 | ||||
5 | permissions controller for Rhodecode |
|
6 | permissions controller for Rhodecode | |
6 |
|
7 | |||
7 | :created_on: Apr 27, 2010 |
|
8 | :created_on: Apr 27, 2010 |
@@ -1,8 +1,15 b'' | |||||
1 | #!/usr/bin/env python |
|
1 | # -*- coding: utf-8 -*- | |
2 | # encoding: utf-8 |
|
2 | """ | |
3 | # users controller for pylons |
|
3 | rhodecode.controllers.admin.users | |
4 | # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
|
4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
5 | # |
|
5 | ||
|
6 | Users crud controller for pylons | |||
|
7 | ||||
|
8 | :created_on: Apr 4, 2010 | |||
|
9 | :author: marcink | |||
|
10 | :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> | |||
|
11 | :license: GPLv3, see COPYING for more details. | |||
|
12 | """ | |||
6 | # This program is free software; you can redistribute it and/or |
|
13 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
14 | # modify it under the terms of the GNU General Public License | |
8 | # as published by the Free Software Foundation; version 2 |
|
15 | # as published by the Free Software Foundation; version 2 | |
@@ -17,26 +24,24 b'' | |||||
17 | # along with this program; if not, write to the Free Software |
|
24 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
19 | # MA 02110-1301, USA. |
|
26 | # MA 02110-1301, USA. | |
20 | """ |
|
27 | ||
21 | Created on April 4, 2010 |
|
28 | import logging | |
22 | users controller for pylons |
|
29 | import traceback | |
23 | @author: marcink |
|
30 | import formencode | |
24 | """ |
|
|||
25 |
|
31 | |||
26 | from formencode import htmlfill |
|
32 | from formencode import htmlfill | |
27 | from pylons import request, session, tmpl_context as c, url |
|
33 | from pylons import request, session, tmpl_context as c, url | |
28 | from pylons.controllers.util import abort, redirect |
|
34 | from pylons.controllers.util import abort, redirect | |
29 | from pylons.i18n.translation import _ |
|
35 | from pylons.i18n.translation import _ | |
|
36 | ||||
30 | from rhodecode.lib.exceptions import * |
|
37 | from rhodecode.lib.exceptions import * | |
31 | from rhodecode.lib import helpers as h |
|
38 | from rhodecode.lib import helpers as h | |
32 | from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator |
|
39 | from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator | |
33 | from rhodecode.lib.base import BaseController, render |
|
40 | from rhodecode.lib.base import BaseController, render | |
|
41 | ||||
34 | from rhodecode.model.db import User |
|
42 | from rhodecode.model.db import User | |
35 | from rhodecode.model.forms import UserForm |
|
43 | from rhodecode.model.forms import UserForm | |
36 | from rhodecode.model.user import UserModel |
|
44 | from rhodecode.model.user import UserModel | |
37 | import formencode |
|
|||
38 | import logging |
|
|||
39 | import traceback |
|
|||
40 |
|
45 | |||
41 | log = logging.getLogger(__name__) |
|
46 | log = logging.getLogger(__name__) | |
42 |
|
47 | |||
@@ -119,7 +124,7 b' class UsersController(BaseController):' | |||||
119 | encoding="UTF-8") |
|
124 | encoding="UTF-8") | |
120 | except Exception: |
|
125 | except Exception: | |
121 | log.error(traceback.format_exc()) |
|
126 | log.error(traceback.format_exc()) | |
122 | h.flash(_('error occured during update of user %s') \ |
|
127 | h.flash(_('error occurred during update of user %s') \ | |
123 | % form_result.get('username'), category='error') |
|
128 | % form_result.get('username'), category='error') | |
124 |
|
129 | |||
125 | return redirect(url('users')) |
|
130 | return redirect(url('users')) |
General Comments 0
You need to be logged in to leave comments.
Login now