~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/user.py

  • Committer: Matt Giuca
  • Date: 2010-02-11 04:36:24 UTC
  • Revision ID: matt.giuca@gmail.com-20100211043624-ofjcxwju8e8bkncl
user.py: All user pages are now in the tab "users", so they show the user icon
    rather than no icon. This affects normal users as well as admins.
xhtml.py: Check the "admin-only" status of a tab after setting the page icon,
    so that normal users get the nice icon even if they aren't supposed to see
    the tab in the menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
class UserEditView(XHTMLView):
80
80
    """A form to change a user's details."""
81
81
    template = 'templates/user-edit.html'
82
 
    tab = 'settings'
 
82
    tab = 'users'
83
83
    permission = 'edit'
84
84
 
85
85
    def filter(self, stream, ctx):
122
122
class UserAdminView(XHTMLView):
123
123
    """A form for admins to change more of a user's details."""
124
124
    template = 'templates/user-admin.html'
125
 
    tab = 'settings'
 
125
    tab = 'users'
126
126
 
127
127
    def authorize(self, req):
128
128
        """Only allow access if the requesting user is an admin."""
162
162
class PasswordChangeView(XHTMLView):
163
163
    """A form to change a user's password, with knowledge of the old one."""
164
164
    template = 'templates/user-password-change.html'
165
 
    tab = 'settings'
 
165
    tab = 'users'
166
166
    permission = 'edit'
167
167
 
168
168
    def authorize(self, req):
196
196
class PasswordResetView(XHTMLView):
197
197
    """A form to reset a user's password, without knowledge of the old one."""
198
198
    template = 'templates/user-password-reset.html'
199
 
    tab = 'settings'
 
199
    tab = 'users'
200
200
 
201
201
    def authorize(self, req):
202
202
        """Only allow access if the requesting user is an admin."""