This module contains a class called UserController which provides a controller for User. This class is similar to PLMObjectController but some methods from PLMObjectController are not defined.
Bases: openPLM.plmapp.controllers.base.Controller
Object used to manage a User and store his modification in a history
Attributes : | |
---|---|
Paramètres: |
Note
This class does not inherit from PLMObjectController.
alias de UserHistory
Returns a verbose name for attr_name.
Example:
>>> ctrl.get_verbose_name("rank")
u'role in PLM'
Updates object from data of form
This method raises ValueError if form is invalid.
Saves object and records its history in the database. If with_history is False, the history is not recorded.
Permission required: owner
Delegates role role to user.
Raise : | PermissionError if user can not have the role role |
---|---|
Raise : | ValueError if user is object |
Permission required: owner
Removes a delegation (delegation_link). The delegator must be object, otherwise a ValueError is raised.
Adds private file f. f should be a File with an attribute name (like an UploadedFile).
Retourne: | the PrivateFile created. |
---|---|
Raises : | PermissionError if _user is not the owner of object |
Raises : | ValueError if the file size is superior to settings.MAX_FILE_SIZE |
Deletes doc_file, the file attached to doc_file is physically removed.
Exceptions raised: | |
---|---|
|
|
Paramètres: | doc_file (PrivateFile) – the file to be deleted |
Updates uploaded file informations with data from formset
Paramètres: | formset (a modelfactory_formset of ModifyFileForm) – |
---|---|
Raises : | PermissionError if _user is not the owner of object |