Mercurial > public > src > rhodecode
changeset 348:aafd9a98ea58
added admin flag to users editing
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 01 Jul 2010 18:17:52 +0200 |
parents | cec5cbc956c0 |
children | 9685a1be8782 4c9a295d80a4 |
files | pylons_app/model/forms.py pylons_app/templates/admin/users/user_edit.html |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/model/forms.py Thu Jul 01 18:10:43 2010 +0200 +++ b/pylons_app/model/forms.py Thu Jul 01 18:17:52 2010 +0200 @@ -230,6 +230,7 @@ username = All(UnicodeString(strip=True, min=3, not_empty=True), ValidUsername) if edit: new_password = All(UnicodeString(strip=True, min=3, not_empty=False), ValidPassword) + admin = StringBoolean(if_missing=False) else: password = All(UnicodeString(strip=True, min=3, not_empty=False), ValidPassword) active = StringBoolean(if_missing=False)
--- a/pylons_app/templates/admin/users/user_edit.html Thu Jul 01 18:10:43 2010 +0200 +++ b/pylons_app/templates/admin/users/user_edit.html Thu Jul 01 18:17:52 2010 +0200 @@ -49,6 +49,11 @@ <td>${self.get_form_error('active')}</td> </tr> <tr> + <td>${_('Admin')}</td> + <td>${h.checkbox('admin',value=True)}</td> + <td>${self.get_form_error('admin')}</td> + </tr> + <tr> <td></td> <td>${h.submit('save','save')}</td> </tr>