Controllers - UsermanagerController
Description
The UsermanagerController is SaWALi's User Management System controller. It provides regular users an interface for modifying their account information; and administrators to assign new privilege levels to registered users.
Properties
- doauth (string "*")
- Means all controller methods require the user to be authenticated.
- can_admin (boolean, False by default)
- Set to True if the user has administrative privileges.
- usersdb (instance)
- Instance of UsersBase.
Methods
- __before__
- Calls BaseController.__before__ for checking user authentication and template locations; and sees whether the user has administrative privileges (sets `can_admin` to True, if so). Then instantiates the UsersBase model as `usersdb`.
- index
- Shows a list of registered users and an account editor form by rendering "templates/users/users.list.html". If the user is an administrator, provides options (demote, promote) per user in the list.
- demote
- Administrators only. Reduces a user's privilege level by one then redirects to index.
- promote
- Administrators only. Increases a user's privilege level by one then redirects to index.
- update_self
- Avaliable to all users. Updates the user's OpenID URL and/or user name properties, then redirects to index.