wuttaweb.views.users¶
Views for users
- class wuttaweb.views.users.UserView(request, context=None)[source]¶
Master view for users.
Default route prefix is
users.Notable URLs provided by this class:
/users//users/new/users/XXX/users/XXX/edit/users/XXX/delete
- add_api_token()[source]¶
AJAX view for adding a new user API token.
This calls
wuttjamaican.auth.AuthHandler.add_api_token()for the creation logic.
- delete_api_token()[source]¶
AJAX view for deleting a user API token.
This calls
wuttjamaican.auth.AuthHandler.delete_api_token()for the deletion logic.
- make_api_tokens_grid(user)[source]¶
Make and return the grid for the API Tokens field.
This is only shown when current user has permission to manage API tokens for other users.
- Return type:
- merge_execute(removing, keeping)[source]¶
The logic to merge 2 users is extended as follows:
The “keeping” user will be assigned to all roles to which the “removing” user belonged.
Any upgrades created or executed by the “removing” user will be updated to reference the “keeping” user instead.
Any versioning (SQLAlchemy-Continuum) transactions created by the “removing” user will be updated to reference the “keeping” user instead.
See also parent method:
merge_execute()
- merge_why_not(removing, keeping)[source]¶
This checks to ensure the current user is not the same as the “removing” user.
See also parent method:
merge_why_not()