Commits

Anonymous committed 985d486

Finished basic user administration.

  • Participants
  • Parent commits c349d38

Comments (0)

Files changed (13)

File solace/forms.py

            self.request.user == user:
             raise forms.ValidationError(_(u'You cannot ban yourself.'))
         self.user = user
+
+
+class EditUserRedirectForm(forms.Form):
+    """Redirects to a user edit page."""
+    username = forms.TextField(lazy_gettext(u'Username'), required=True)
+
+    def validate_username(self, value):
+        user = User.query.filter_by(username=value).first()
+        if user is None:
+            raise forms.ValidationError(_(u'No such user.'))
+        self.user = user
+
+
+class EditUserForm(ProfileEditForm):
+    """Like the profile form."""
+    is_admin = forms.BooleanField(lazy_gettext(u'Administrator'),
+        help_text=lazy_gettext(u'Enable if this user is an admin.'))
+
+    def __init__(self, user, initial=None, action=None, request=None):
+        if user is not None:
+            initial = forms.fill_dict(initial, is_admin=user.is_admin)
+        ProfileEditForm.__init__(self, user, initial, action, request)
+
+    def validate_is_admin(self, value):
+        if not value and self.request and self.request.user == self.user:
+            raise forms.ValidationError(u'You cannot remove your own '
+                                        u'admin rights.')
+
+    def apply_changes(self):
+        super(EditUserForm, self).apply_changes()
+        self.user.is_admin = self.data['is_admin']

File solace/i18n/de/LC_MESSAGES/messages.mo

Binary file modified.

File solace/i18n/de/LC_MESSAGES/messages.po

 "Project-Id-Version: Solace 0.1\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
 "POT-Creation-Date: 2009-08-14 12:14+0200\n"
-"PO-Revision-Date: 2009-09-23 11:39+0200\n"
+"PO-Revision-Date: 2009-09-24 00:14+0200\n"
 "Last-Translator: Armin Ronacher <armin.ronacher@active-4.com>\n"
 "Language-Team: de <LL@li.org>\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 0.9.4\n"
 
-#: solace/application.py:317 solace/application.py:344
+#: solace/application.py:328 solace/application.py:355
 msgid "You have to login in order to visit this page."
 msgstr "Du musst dich anmelden um diese Seite zu sehen."
 
-#: solace/application.py:328
+#: solace/application.py:339
 msgid "You cannot access this resource."
 msgstr "Du kannst diese Seite nicht ansehen."
 
 msgstr "Der Benutzername darf nicht mit einem Punkt beginnen oder enden."
 
 #: solace/forms.py:40 solace/forms.py:53 solace/forms.py:81 solace/forms.py:264
-#: solace/templates/users/profile.html:22
+#: solace/forms.py:278 solace/templates/users/profile.html:22
 msgid "Username"
 msgstr "Benutzername"
 
 msgid "Write your reply and answer the question"
 msgstr "Schreib deine Rückmeldung und beantworte die Frage"
 
-#: solace/forms.py:269
+#: solace/forms.py:269 solace/forms.py:283
 msgid "No such user."
 msgstr "Kein solcher Benutzer."
 
 msgid "You cannot ban yourself."
 msgstr "Du kannst dich nicht selbst bannen."
 
+#: solace/forms.py:289
+msgid "Administrator"
+msgstr "Administrator"
+
+#: solace/forms.py:290
+msgid "Enable if this user is an admin."
+msgstr "Aktiviere dies, wenn der Benutzer ein Administrator ist."
+
 #. : i18n support, leave in place for custom settings modules
 #. : the platform we're running on
 #. : the database URI
 msgstr "Benutzer"
 
 #: solace/templates/layout.html:68 solace/templates/badges/show_list.html:3
-#: solace/templates/users/profile.html:65
+#: solace/templates/users/profile.html:66
 msgid "Badges"
 msgstr "Plaketten"
 
 msgid "Banned Users"
 msgstr "Gebannte Benutzer"
 
-#: solace/templates/admin/bans.html:24 solace/templates/users/profile.html:39
+#: solace/templates/admin/bans.html:24 solace/templates/admin/edit_user.html:11
 msgid "lift the ban"
 msgstr "Bann aufheben"
 
 msgid "No users are currently banned."
 msgstr "Momentan sind keine Benutzer auf der Bannliste."
 
+#: solace/templates/admin/edit_user.html:5
+#, python-format
+msgid "Edit User “%s”"
+msgstr "Bearbeite Benutzer „%s“"
+
+#: solace/templates/admin/edit_user.html:9
+msgid "Related actions:"
+msgstr "Verwandte Aktionen:"
+
+#: solace/templates/admin/edit_user.html:13
+msgid "ban this user"
+msgstr "banne diesen Benutzer"
+
+#: solace/templates/admin/edit_user.html:16
+#: solace/templates/admin/edit_users.html:16
+#: solace/templates/admin/edit_users.html:24
+#: solace/templates/users/profile.html:38
+msgid "Edit User"
+msgstr "Bearbeite Benutzer"
+
+#: solace/templates/admin/edit_users.html:4
+#: solace/templates/admin/layout.html:9
+msgid "Edit Users"
+msgstr "Bearbeite Benutzer"
+
+#: solace/templates/admin/edit_users.html:5
+msgid "Edit user profiles."
+msgstr "Bearbeiten Benutzer Profile."
+
+#: solace/templates/admin/edit_users.html:8
+msgid "Edit a specific user"
+msgstr "Bearbeite einen bestimmten Benutzer"
+
+#: solace/templates/admin/edit_users.html:9
+msgid ""
+"In order to edit a user visit his profile and follow the\n"
+"    “Edit User” link or enter his username into the following field:"
+msgstr ""
+"Um einen Benutzer zu bearbeiten besuche sein Profil und folge dem\n"
+"„Bearbeite Benutzer“ Link oder gibt seinen Benutzernamen in das folgende "
+"Feld ein:"
+
+#: solace/templates/admin/edit_users.html:19
+#: solace/templates/users/userlist.html:3
+msgid "All Users"
+msgstr "Alle Benutzer"
+
 #: solace/templates/admin/layout.html:7 solace/templates/admin/status.html:3
 msgid "Status"
 msgstr "Status"
 msgid "Hot"
 msgstr "Heiß"
 
-#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:51
+#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:52
 msgid "Votes"
 msgstr "Stimmen"
 
 msgid "Show revisions"
 msgstr "Revisionen anzeigen"
 
-#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:54
-#: solace/templates/users/profile.html:59
+#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:55
+#: solace/templates/users/profile.html:60
 msgid "Up"
 msgstr "Hoch"
 
-#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:56
-#: solace/templates/users/profile.html:61
+#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:57
+#: solace/templates/users/profile.html:62
 msgid "Down"
 msgstr "Nieder"
 
 msgid "Administrative tasks"
 msgstr "Administrationsaufgaben"
 
-#: solace/templates/users/profile.html:41
-msgid "ban this user"
+#: solace/templates/users/profile.html:40
+msgid "Lift the Ban"
+msgstr "Bann aufheben"
+
+#: solace/templates/users/profile.html:42
+msgid "Ban this User"
 msgstr "banne diesen Benutzer"
 
-#: solace/templates/users/profile.html:46
+#: solace/templates/users/profile.html:47
 msgid "This user was banned"
 msgstr "Dieser Benutzer wurde gebannt"
 
-#: solace/templates/users/profile.html:48
+#: solace/templates/users/profile.html:49
 msgid "Reputation"
 msgstr "Ansehen"
 
-#: solace/templates/users/profile.html:75
+#: solace/templates/users/profile.html:76
 msgid "Most Popular Questions"
 msgstr "Die bliebtesten Fragen"
 
-#: solace/templates/users/profile.html:79
+#: solace/templates/users/profile.html:80
 msgid "Most Popular Replies"
 msgstr "Die bliebtesten Antworten"
 
-#: solace/templates/users/userlist.html:3
-msgid "All Users"
-msgstr "Alle Benutzer"
-
 #: solace/templates/users/userlist.html:4
 #: solace/templates/users/userlist.html:16
 #, python-format
 msgid "Incorrect. Try again."
 msgstr "Falsch, bitte probiere es nochmal"
 
-#: solace/views/admin.py:47 solace/views/admin.py:85
+#: solace/views/admin.py:47 solace/views/admin.py:111
 #, python-format
 msgid "The user “%s” was successfully banned and notified."
 msgstr "Der Benutzer “%s” wurde erfolgreich gebannt und benachrichtigt."
 
-#: solace/views/admin.py:65
+#: solace/views/admin.py:77
+msgid "The user details where changed."
+msgstr "Die Benutzerdetails wurden verändert."
+
+#: solace/views/admin.py:91
 msgid "The user is not banned."
 msgstr "Der Benutzer ist nicht gebannt."
 
-#: solace/views/admin.py:68
+#: solace/views/admin.py:94
 #, python-format
 msgid "The user “%s” was successfully unbanned and notified."
 msgstr "Der Benutzer “%s” wurde erfolgreich entbannt und benachrichtigt."
 
-#: solace/views/admin.py:82
+#: solace/views/admin.py:108
 msgid "The user is already banned."
 msgstr "Dieser Benutzer ist bereits gebannt."
 

File solace/i18n/messages.pot

 msgstr ""
 "Project-Id-Version: Plurk_Solace 0.1\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2009-09-23 11:39+0200\n"
+"POT-Creation-Date: 2009-09-24 00:14+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 0.9.4\n"
 
-#: solace/application.py:317 solace/application.py:344
+#: solace/application.py:328 solace/application.py:355
 msgid "You have to login in order to visit this page."
 msgstr ""
 
-#: solace/application.py:328
+#: solace/application.py:339
 msgid "You cannot access this resource."
 msgstr ""
 
 msgstr ""
 
 #: solace/forms.py:40 solace/forms.py:53 solace/forms.py:81 solace/forms.py:264
-#: solace/templates/users/profile.html:22
+#: solace/forms.py:278 solace/templates/users/profile.html:22
 msgid "Username"
 msgstr ""
 
 msgid "Write your reply and answer the question"
 msgstr ""
 
-#: solace/forms.py:269
+#: solace/forms.py:269 solace/forms.py:283
 msgid "No such user."
 msgstr ""
 
 msgid "You cannot ban yourself."
 msgstr ""
 
+#: solace/forms.py:289
+msgid "Administrator"
+msgstr ""
+
+#: solace/forms.py:290
+msgid "Enable if this user is an admin."
+msgstr ""
+
 #. : i18n support, leave in place for custom settings modules
 #. : the platform we're running on
 #. : the database URI
 msgstr ""
 
 #: solace/templates/layout.html:68 solace/templates/badges/show_list.html:3
-#: solace/templates/users/profile.html:65
+#: solace/templates/users/profile.html:66
 msgid "Badges"
 msgstr ""
 
 msgid "Banned Users"
 msgstr ""
 
-#: solace/templates/admin/bans.html:24 solace/templates/users/profile.html:39
+#: solace/templates/admin/bans.html:24 solace/templates/admin/edit_user.html:11
 msgid "lift the ban"
 msgstr ""
 
 msgid "No users are currently banned."
 msgstr ""
 
+#: solace/templates/admin/edit_user.html:5
+#, python-format
+msgid "Edit User “%s”"
+msgstr ""
+
+#: solace/templates/admin/edit_user.html:9
+msgid "Related actions:"
+msgstr ""
+
+#: solace/templates/admin/edit_user.html:13
+msgid "ban this user"
+msgstr ""
+
+#: solace/templates/admin/edit_user.html:16
+#: solace/templates/admin/edit_users.html:16
+#: solace/templates/admin/edit_users.html:24
+#: solace/templates/users/profile.html:38
+msgid "Edit User"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:4
+#: solace/templates/admin/layout.html:9
+msgid "Edit Users"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:5
+msgid "Edit user profiles."
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:8
+msgid "Edit a specific user"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:9
+msgid ""
+"In order to edit a user visit his profile and follow the\n"
+"    “Edit User” link or enter his username into the following field:"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:19
+#: solace/templates/users/userlist.html:3
+msgid "All Users"
+msgstr ""
+
 #: solace/templates/admin/layout.html:7 solace/templates/admin/status.html:3
 msgid "Status"
 msgstr ""
 msgid "Hot"
 msgstr ""
 
-#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:51
+#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:52
 msgid "Votes"
 msgstr ""
 
 msgid "Show revisions"
 msgstr ""
 
-#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:54
-#: solace/templates/users/profile.html:59
+#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:55
+#: solace/templates/users/profile.html:60
 msgid "Up"
 msgstr ""
 
-#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:56
-#: solace/templates/users/profile.html:61
+#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:57
+#: solace/templates/users/profile.html:62
 msgid "Down"
 msgstr ""
 
 msgid "Administrative tasks"
 msgstr ""
 
-#: solace/templates/users/profile.html:41
-msgid "ban this user"
+#: solace/templates/users/profile.html:40
+msgid "Lift the Ban"
 msgstr ""
 
-#: solace/templates/users/profile.html:46
+#: solace/templates/users/profile.html:42
+msgid "Ban this User"
+msgstr ""
+
+#: solace/templates/users/profile.html:47
 msgid "This user was banned"
 msgstr ""
 
-#: solace/templates/users/profile.html:48
+#: solace/templates/users/profile.html:49
 msgid "Reputation"
 msgstr ""
 
-#: solace/templates/users/profile.html:75
+#: solace/templates/users/profile.html:76
 msgid "Most Popular Questions"
 msgstr ""
 
-#: solace/templates/users/profile.html:79
+#: solace/templates/users/profile.html:80
 msgid "Most Popular Replies"
 msgstr ""
 
-#: solace/templates/users/userlist.html:3
-msgid "All Users"
-msgstr ""
-
 #: solace/templates/users/userlist.html:4
 #: solace/templates/users/userlist.html:16
 #, python-format
 msgid "Incorrect. Try again."
 msgstr ""
 
-#: solace/views/admin.py:47 solace/views/admin.py:85
+#: solace/views/admin.py:47 solace/views/admin.py:111
 #, python-format
 msgid "The user “%s” was successfully banned and notified."
 msgstr ""
 
-#: solace/views/admin.py:65
+#: solace/views/admin.py:77
+msgid "The user details where changed."
+msgstr ""
+
+#: solace/views/admin.py:91
 msgid "The user is not banned."
 msgstr ""
 
-#: solace/views/admin.py:68
+#: solace/views/admin.py:94
 #, python-format
 msgid "The user “%s” was successfully unbanned and notified."
 msgstr ""
 
-#: solace/views/admin.py:82
+#: solace/views/admin.py:108
 msgid "The user is already banned."
 msgstr ""
 

File solace/i18n/tr/LC_MESSAGES/messages.mo

Binary file modified.

File solace/i18n/tr/LC_MESSAGES/messages.po

 "Project-Id-Version: Solace 0.1\n"
 "Report-Msgid-Bugs-To: muhuk@muhuk.com\n"
 "POT-Creation-Date: 2009-08-31 02:34+0200\n"
-"PO-Revision-Date: 2009-09-23 11:39+0200\n"
+"PO-Revision-Date: 2009-09-24 00:14+0200\n"
 "Last-Translator: Atamert Ölçgen <muhuk@muhuk.com>\n"
 "Language-Team: tr <LL@li.org>\n"
 "Plural-Forms: nplurals=1; plural=0\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 0.9.4\n"
 
-#: solace/application.py:317 solace/application.py:344
+#: solace/application.py:328 solace/application.py:355
 msgid "You have to login in order to visit this page."
 msgstr "Bu sayfayı görebilmek için giriş yapmalısınız."
 
-#: solace/application.py:328
+#: solace/application.py:339
 #, fuzzy
 msgid "You cannot access this resource."
 msgstr "Bu yanıtı kabul edemezsiniz."
 msgstr "Kullanıcı adının başında veya sonunda nokta olamaz."
 
 #: solace/forms.py:40 solace/forms.py:53 solace/forms.py:81 solace/forms.py:264
-#: solace/templates/users/profile.html:22
+#: solace/forms.py:278 solace/templates/users/profile.html:22
 msgid "Username"
 msgstr "Kullanıcı Adı"
 
 msgid "Write your reply and answer the question"
 msgstr "Yanıtınızı buraya yazın ve soruyu cevaplayın"
 
-#: solace/forms.py:269
+#: solace/forms.py:269 solace/forms.py:283
 msgid "No such user."
 msgstr ""
 
 msgid "You cannot ban yourself."
 msgstr "Kendi girdinize puan veremezsiniz."
 
+#: solace/forms.py:289
+msgid "Administrator"
+msgstr ""
+
+#: solace/forms.py:290
+msgid "Enable if this user is an admin."
+msgstr ""
+
 #. : i18n support, leave in place for custom settings modules
 #. : the platform we're running on
 #. : the database URI
 msgstr "Kullanıcılar"
 
 #: solace/templates/layout.html:68 solace/templates/badges/show_list.html:3
-#: solace/templates/users/profile.html:65
+#: solace/templates/users/profile.html:66
 msgid "Badges"
 msgstr "Rozetler"
 
 msgid "Banned Users"
 msgstr ""
 
-#: solace/templates/admin/bans.html:24 solace/templates/users/profile.html:39
+#: solace/templates/admin/bans.html:24 solace/templates/admin/edit_user.html:11
 msgid "lift the ban"
 msgstr ""
 
 msgid "No users are currently banned."
 msgstr "Bu kullanıcı adı kullanımda."
 
+#: solace/templates/admin/edit_user.html:5
+#, fuzzy, python-format
+msgid "Edit User “%s”"
+msgstr "“%s” Düzenleniyor"
+
+#: solace/templates/admin/edit_user.html:9
+msgid "Related actions:"
+msgstr ""
+
+#: solace/templates/admin/edit_user.html:13
+msgid "ban this user"
+msgstr ""
+
+#: solace/templates/admin/edit_user.html:16
+#: solace/templates/admin/edit_users.html:16
+#: solace/templates/admin/edit_users.html:24
+#: solace/templates/users/profile.html:38
+msgid "Edit User"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:4
+#: solace/templates/admin/layout.html:9
+msgid "Edit Users"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:5
+#, fuzzy
+msgid "Edit user profiles."
+msgstr "Profili düzenle"
+
+#: solace/templates/admin/edit_users.html:8
+msgid "Edit a specific user"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:9
+msgid ""
+"In order to edit a user visit his profile and follow the\n"
+"    “Edit User” link or enter his username into the following field:"
+msgstr ""
+
+#: solace/templates/admin/edit_users.html:19
+#: solace/templates/users/userlist.html:3
+msgid "All Users"
+msgstr "Tüm Kullanıcılar"
+
 #: solace/templates/admin/layout.html:7 solace/templates/admin/status.html:3
 msgid "Status"
 msgstr ""
 msgid "Hot"
 msgstr "Taze"
 
-#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:51
+#: solace/templates/kb/_boxes.html:47 solace/templates/users/profile.html:52
 msgid "Votes"
 msgstr "Oylar"
 
 msgid "Show revisions"
 msgstr "Düzenlemeleri göster"
 
-#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:54
-#: solace/templates/users/profile.html:59
+#: solace/templates/kb/_boxes.html:100 solace/templates/users/profile.html:55
+#: solace/templates/users/profile.html:60
 msgid "Up"
 msgstr "Yukarı"
 
-#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:56
-#: solace/templates/users/profile.html:61
+#: solace/templates/kb/_boxes.html:102 solace/templates/users/profile.html:57
+#: solace/templates/users/profile.html:62
 msgid "Down"
 msgstr "Aşağı"
 
 msgid "Administrative tasks"
 msgstr ""
 
-#: solace/templates/users/profile.html:41
-msgid "ban this user"
+#: solace/templates/users/profile.html:40
+msgid "Lift the Ban"
 msgstr ""
 
-#: solace/templates/users/profile.html:46
+#: solace/templates/users/profile.html:42
+msgid "Ban this User"
+msgstr ""
+
+#: solace/templates/users/profile.html:47
 msgid "This user was banned"
 msgstr ""
 
-#: solace/templates/users/profile.html:48
+#: solace/templates/users/profile.html:49
 msgid "Reputation"
 msgstr "Saygınlık"
 
-#: solace/templates/users/profile.html:75
+#: solace/templates/users/profile.html:76
 msgid "Most Popular Questions"
 msgstr "Popüler Sorular"
 
-#: solace/templates/users/profile.html:79
+#: solace/templates/users/profile.html:80
 msgid "Most Popular Replies"
 msgstr "Popüler Yanıtlar"
 
-#: solace/templates/users/userlist.html:3
-msgid "All Users"
-msgstr "Tüm Kullanıcılar"
-
 #: solace/templates/users/userlist.html:4
 #: solace/templates/users/userlist.html:16
 #, python-format
 msgid "Incorrect. Try again."
 msgstr "Yanlış. Tekrar deneyiniz."
 
-#: solace/views/admin.py:47 solace/views/admin.py:85
+#: solace/views/admin.py:47 solace/views/admin.py:111
 #, python-format
 msgid "The user “%s” was successfully banned and notified."
 msgstr ""
 
-#: solace/views/admin.py:65
+#: solace/views/admin.py:77
+#, fuzzy
+msgid "The user details where changed."
+msgstr "Bu kullanıcı adı kullanımda."
+
+#: solace/views/admin.py:91
 #, fuzzy
 msgid "The user is not banned."
 msgstr "Bu kullanıcı hesabı henüz onaylanmadı."
 
-#: solace/views/admin.py:68
+#: solace/views/admin.py:94
 #, python-format
 msgid "The user “%s” was successfully unbanned and notified."
 msgstr ""
 
-#: solace/views/admin.py:82
+#: solace/views/admin.py:108
 #, fuzzy
 msgid "The user is already banned."
 msgstr "Bu kullanıcı adı kullanımda."
 msgid "Your profile was updated"
 msgstr "Profiliniz güncellendi"
 
+#~ msgid "Check if this user is an admin."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "In order to edit a user visit his profile and follow the\n"
+#~ "    “edit user” link or enter his username into the following field:"
+#~ msgstr ""
+
+#~ msgid "Edit user"
+#~ msgstr ""
+
+#~ msgid "edit user"
+#~ msgstr ""
+

File solace/templates/admin/edit_user.html

+{% extends 'admin/layout.html' %}
+{% from '_helpers.html' import render_user %}
+{% set admin_navigation_item = 'admin.edit_users' %}
+{% block admin_body %}
+  <h2>{{ _('Edit User “%s”') % ('<a href="%s">%s</a>' %
+    (url_for(user), user.display_name|e )) }}</h2>
+  {% call form() %}
+    {{ form.as_dl() }}
+    <p>{{ _('Related actions:') }}
+      {% if user.is_banned %}
+      <a href="{{ url_for('admin.unban_user', user=user.username) }}">{{ _('lift the ban') }}</a>
+      {% else %}
+      <a href="{{ url_for('admin.ban_user', user=user.username) }}">{{ _('ban this user') }}</a>
+      {% endif %}
+    <div class="buttons">
+      <input type="submit" value="{{ _('Edit User') }}">
+    </div>
+  {% endcall %}
+{% endblock %}

File solace/templates/admin/edit_users.html

+{% extends 'admin/layout.html' %}
+{% from '_helpers.html' import render_user %}
+{% block admin_body %}
+  <h2>{{ _('Edit Users') }}</h2>
+  <p>{% trans -%}
+    Edit user profiles.
+  {%- endtrans %}
+  <h3>{{ _('Edit a specific user') }}</h3>
+  <p>{% trans -%}
+    In order to edit a user visit his profile and follow the
+    “Edit User” link or enter his username into the following field:
+  {%- endtrans %}
+  {% call form() %}
+    {{ form.as_dl() }}
+    <div class="submit">
+      <input type="submit" value="{{ _('Edit User') }}">
+    </div>
+  {% endcall %}
+  <h3>{{ _('All Users') }}</h3>
+  <ul class="userlist">
+  {%- for user in users %}
+    <li>{{ render_user(user, avatar_size=26) }}
+      <span class="action">[<a href="{{ url_for('admin.edit_user', user=user.username)
+        }}">{{ _('Edit User') }}</a>]</span>
+  {%- endfor %}
+  </ul>
+  {{ pagination }}
+{% endblock %}

File solace/templates/admin/layout.html

     <h1>{{ _('Admin Panel') }}</h1>
     <ul class="admin_navigation">
     {%- for endpoint, title in [('admin.status', _('Status')),
-                                ('admin.bans', _('Bans'))] %}
-      <li{% if endpoint == request.endpoint %} class="active"{%
+                                ('admin.bans', _('Bans')),
+                                ('admin.edit_users', _('Edit Users'))] %}
+      <li{% if endpoint == (admin_navigation_item or request.endpoint) %} class="active"{%
         endif %}><a href="{{ url_for(endpoint) }}">{{ title }}</a>
     {%- endfor %}
     </ul>

File solace/templates/layout.html

 <!doctype html>
 {%- from '_helpers.html' import render_user %}
 {%- block html_head %}
-<title>{% block html_head_title %}{% if page_title %}{{ page_title
+<title>{% block html_head_title %}{% if page_title %}{{ page_title|e
   }} | {% endif %}{{ settings.WEBSITE_TITLE|e }}{% endblock %}</title>
 {{ packs.default }}
 <script type="text/javascript" src="{{ url_for('core.get_translations', lang=request.locale) }}"></script>

File solace/templates/users/profile.html

     {% if request.is_logged_in and request.user.is_admin %}
     <dt>{{ _('Administrative tasks') }}
     <dd>
+      <a href="{{ url_for('admin.edit_user', user=user.username) }}">{{ _('Edit User') }}</a> |
       {% if user.is_banned %}
-      <a href="{{ url_for('admin.unban_user', user=user.username) }}">{{ _('lift the ban') }}</a>
+      <a href="{{ url_for('admin.unban_user', user=user.username) }}">{{ _('Lift the Ban') }}</a>
       {% else %}
-      <a href="{{ url_for('admin.ban_user', user=user.username) }}">{{ _('ban this user') }}</a>
+      <a href="{{ url_for('admin.ban_user', user=user.username) }}">{{ _('Ban this User') }}</a>
       {% endif %}
     {% endif %}
   </dl>

File solace/urls.py

     Rule('/admin/bans') > 'admin.bans',
     Rule('/admin/ban/<user>') > 'admin.ban_user',
     Rule('/admin/unban/<user>') > 'admin.unban_user',
+    Rule('/admin/users/') > 'admin.edit_users',
+    Rule('/admin/users/<user>') > 'admin.edit_user',
 
     # AJAX
     Rule('/_set_language/<locale>') > 'core.set_language',

File solace/views/admin.py

 from solace.i18n import _
 from solace.application import require_admin, url_for
 from solace.models import User, session
-from solace.forms import BanUserForm
+from solace.forms import BanUserForm, EditUserRedirectForm, EditUserForm
 from solace.settings import describe_settings
 from solace.templating import render_template
 from solace.utils.pagination import Pagination
                            form=form.as_widget())
 
 
+@require_admin
+def edit_users(request):
+    """Edit a user."""
+    pagination = Pagination(request, User.query, request.args.get('page', type=int))
+    form = EditUserRedirectForm()
+
+    if request.method == 'POST' and form.validate():
+        return redirect(url_for('admin.edit_user', user=form.user.username))
+
+    return render_template('admin/edit_users.html', pagination=pagination,
+                           users=pagination.get_objects(), form=form.as_widget())
+
+
+@require_admin
+def edit_user(request, user):
+    """Edits a user."""
+    user = User.query.filter_by(username=user).first()
+    if user is None:
+        raise NotFound()
+    form = EditUserForm(user)
+    if request.method == 'POST' and form.validate():
+        request.flash(_(u'The user details where changed.'))
+        return form.redirect('admin.edit_users')
+    return render_template('admin/edit_user.html', form=form.as_widget(), user=user)
+
+
 @exchange_token_protected
 @require_admin
 def unban_user(request, user):