feat(share): calendar_share invite/ACL for personal and commercial.
CI / test (push) Failing after 6m37s
CI / deploy-ift (push) Has been skipped
CI / e2e-ift (push) Has been skipped
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

Co-editor and deputy grants with mirror_to_default; personal out of search; list owned+shared. Refs EventHub/EventHubBack#73
This commit is contained in:
2026-08-15 23:20:11 +03:00
parent 00bf72e4d1
commit 331000a464
17 changed files with 1413 additions and 28 deletions
+20 -3
View File
@@ -103,10 +103,27 @@
updated_at :: calendar:datetime()
}).
%% PK = id. Уникальность пары calendar_id+user_id — в logic.
-record(calendar_share, {
calendar_id :: binary(),
user_id :: binary(),
rights :: read | write | admin
id :: binary(),
calendar_id :: binary(),
user_id :: binary(),
rights :: read | write | admin,
mirror_to_default :: boolean()
}).
%% Приглашения к calendar_share (соредактор / заместитель).
-record(calendar_share_invite, {
id :: binary(),
calendar_id :: binary(),
inviter_id :: binary(),
invitee_user_id :: binary(), % <<>> если ещё неизвестен
invitee_email :: binary(), % <<>> если только user_id
rights :: read | write | admin,
status :: pending | accepted | declined | expired | cancelled,
token :: binary(),
created_at :: calendar:datetime(),
expires_at :: calendar:datetime()
}).
%% Follow чужого календаря (не путать с платной subscription / calendar_share)