-
Notifications
You must be signed in to change notification settings - Fork 1
Memberships
Camille Masset edited this page May 4, 2016
·
1 revision
The model GroupMember
represents the membership of a user to a group.
A user has a perm_rank
which gives him/her some powers in the group (see page Groups).
There are two possibilities for a user to become a group member, depending on the group's parameter default_member_rank
:
- if
default_member_rank
= -1, then the user cannot become a member on his own: he has to be invited by a member; - if
default_member_rank
> -1, then then user can request a membership; there are then two sub-cases:-
default_member_rank
= 0, then the request must be validated by a member of the group; -
default_member_rank
> 0, then the request is automatically validated and the user gets the rankdefault_member_rank
.
-
So, to sum up, a user is really a member of a group, when the membership's attribute perm_rank
equals at least 1.
-
created
(datetime, auto_now_add: True): creation date of theGroupMember
instance -
join_date
(datetime): real date of membership -
leave_date
(datetime): date of leaving -
perm_rank
(integer): defines the permission level of user in group
-
user
(modelUser
, related_name: 'memberships') -
group
(modelGroup
, related_name='memberships') -
values
(list of modelsGroupMemberValue
): specific values of CustomFields for the user