User in company space
User is the global identity. UserInCompanySpace is that identity’s
membership in a concrete space. Most client operations are really about the
membership, not the global user.
Roles and states
Section titled “Roles and states”| Field | Values | Note |
|---|---|---|
role | student, admin, owner, participant | Permission and product role in the space. |
state | invited, pending, active, revoked | Membership lifecycle. |
SETTABLE_STATES in code allows only active, revoked, and invited to be
set directly. pending is an internal state and should be handled carefully.
Important relations
Section titled “Important relations”UserInCompanySpacebelongs to oneCompanySpace.- It has an optional supervisor through
supervisor. - It can belong to multiple
UserGrouprecords. - It can be a group leader through a separate relation.
- It has direct content assignments.
- It has content licenses in the space.
- It has participation sources explaining learning tasks.
Non-obvious rules
Section titled “Non-obvious rules”- Ordinary removal revokes the user; it does not delete the membership.
- The model protects the last owner of a company space from revocation or role change.
destroyonUserInCompanySpaceis intentionally discouraged and requires the expliciti_know_what_im_doingparameter.- Changing group membership can trigger learning-task recalculation.
Client translation
Section titled “Client translation”When a client says “delete the user”, internally this often means “revoke the membership in the space”. Study and reporting history should remain preserved.