Invites
Invite Users/Devices to Workspaces
Overview
Roles and permissions:
WorkspaceOwner
: Highest level role, automatically has admin privilegesWorkspaceAdmin
: Can manage invites and user access
Key documents:
Invite
: Tracks invitation status and metadataSubject
: Represents an invited user/device in the workspaceJoinedWorkspace
: Records workspace membership detailsLogin
: Manages user authentication and access
Invitation management:
c.InitiateInvitationByEmail
: Creates new invitationRequires WorkspaceAdmin role
Includes email, roles, expiration, and email template
c.InitiateJoinWorkspace
: Processes invite acceptanceRequires verification code
Creates necessary workspace access records
Role management:
c.InitiateUpdateInviteRoles
: Updates member permissionsAvailable for joined members only
Includes email notification
Membership termination:
c.InitiateCancelAcceptedInvite
: Admin removes memberc.InitiateLeaveWorkspace
: Member voluntarily leavesc.CancelSentInvite
: Cancels pending invitation
Motivation
As a workspace owner I want to invite users into workspace with specified roles, so that if they accept it, they are granted to access my workspace\
As a workspace owner I want to change invited user's roles
As a user, I want to see the list of my workspaces and roles, so that I know what am I available to work with
As a user, I want to be able to leave the workspace I'm invited to
As a workspace owner I want to ban user to he doesn't have access to my workspace anymore
https://github.com/heeus/heeus-design/blob/main/workspaces/invites.md
Concepts
Invite state diagram
Main sequence
Extra
Documents
cdoc.sys.Invite
ID
Login // actually
c.sys.InitiateInvitationByEmail.EMail
Email // actually
c.sys.InitiateInvitationByEmail.EMail
Roles (comma-separated)
ExpireDatetime (unix-timestamp)
VerificationCode
State
Created (unix-timestamp) ???
Updated (unix-timestamp) ???
SubjectID (Subject.ID) // by ap.sys.ApplyJoinWorkspace
InviteeProfileWSID // by ap.sys.ApplyJoinWorkspace
ActualLogin //
token.Login
, by ap.sys.ApplyJoinWorkspace
cdoc.sys.Subject
Login // old stored records ->
Invite.Login
that is actuallyc.sys.InitiateInvitationByEMail.Email
, new records (starting from https://github.com/voedger/voedger/issues/1107) -Invite.ActualLogin
that is login from tokenRoles (comma-separated list)
Last updated
Was this helpful?