This module contains a class called GroupController which provides a controller for Group. 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 Group and store his modification in a history
Attributes : | |
---|---|
Paramètres: |
Note
This class does not inherit from PLMObjectController.
alias de GroupHistory
Creates a PLMObjectController from form and associates user as the creator/owner of the PLMObject.
This method raises ValueError if form is invalid.
Paramètres: |
|
---|---|
Type retourné: | PLMObjectController |
Updates users with data from formset
Paramètres: | formset (a formset_factory of ModifyUserForm) – |
---|---|
Raises : | PermissionError if _user is not the owner of object. |
Permission required: owner
Asks user to join the group.
An email is sent to user so that he can validate its inscription.
Raises : | ValueError if user’s email is empty. |
---|
Asks to join the group.
An email is sent to the group’s owner so that he can validate the inscription.
Raises : | ValueError if the owner’s email is empty. |
---|
Accepts an invitation.
If the owner sent invitation, it checks that _user is the guest and adds him to the group.
If the guest sent invitation, it checks that _user is the owner and adds the guest to the group.
Sends a mail to the owner asking him to accept the invitation to join the group.
This method can be called to resend an invitation.
Raises : | ValueError if the invitation’s state is not Invitation.PENDING |
---|
Sends a mail to the guest asking him to accept the invitation to join the group.
This method can be called to resend an invitation.
Raises : | ValueError if the invitation’s state is not Invitation.PENDING |
---|
Refuses an invitation.
If the owner sent invitation, it checks that _user is the guest and invitation is marked as refused.
If the guest sent invitation, it checks that _user is the owner and invitation is marked as refused.
Saves object and records its history in the database. If with_history is False, the history is not recorded.