S2S: Project: Send ext-Grants to new collab upon getting their delegator-Grant
Until now, adding a direct collaborator to a Project worked exactly like
with components: Invite or Join, then Accept, finally the direct-Grant.
I missed the fact that much like with project-component relationships,
projects (and teams) need to be able to send extension-Grants to their
direct collaborators.
So in Project's Grant handler it now:
- Recognizes the delegator-Grant coming from a new collaborator
- Sends extension-Grants, using the delegator-Grant as the capability
- When getting a new component and sending extension-Grants for it to
direct collaborators, Project uses their delegator-Grants as
capability
And in Project's Accept handler, it no longer sends extension-Grants
(because it doesn't yet have the collaborator's delegator-Grant at this
point).
NOTE, THIS TEMPORARILY BREAKS grant chains: If you create a Project and
add a Deck to it, you won't get an extension-Grant-for-the-Deck from the
Project, because the Project doesn't yet have your delegator-Grant.
The next commits will implement the Person-side of Collab records, and
will cause Person actors to automatically send the delegator-Grant,
fixing the break.
2023-11-22 13:16:08 +01:00
|
|
|
ComponentEnable
|
|
|
|
|
|
|
|
Outbox
|
|
|
|
|
|
|
|
OutboxItem
|
|
|
|
outbox OutboxId
|
|
|
|
activity PersistJSONObject
|
|
|
|
published UTCTime
|
|
|
|
|
|
|
|
Collab
|
|
|
|
role Role
|
|
|
|
|
|
|
|
CollabRecipLocal
|
|
|
|
collab CollabId
|
|
|
|
person PersonId
|
|
|
|
|
|
|
|
UniqueCollabRecipLocal collab
|
|
|
|
|
|
|
|
CollabEnable
|
|
|
|
collab CollabId
|
|
|
|
grant OutboxItemId
|
|
|
|
|
|
|
|
UniqueCollabEnable collab
|
|
|
|
UniqueCollabEnableGrant grant
|
|
|
|
|
|
|
|
CollabDelegLocal
|
|
|
|
enable CollabEnableId
|
|
|
|
recip CollabRecipLocalId
|
|
|
|
grant OutboxItemId
|
|
|
|
|
|
|
|
UniqueCollabDelegLocal enable
|
|
|
|
UniqueCollabDelegLocalRecip recip
|
|
|
|
UniqueCollabDelegLocalGrant grant
|
|
|
|
|
|
|
|
ComponentFurtherLocal
|
|
|
|
component ComponentEnableId
|
|
|
|
collab CollabRecipLocalId
|
|
|
|
collabNew CollabDelegLocalId
|
|
|
|
grant OutboxItemId
|
|
|
|
|
|
|
|
UniqueComponentFurtherLocal component collab
|
|
|
|
UniqueComponentFurtherLocalGrant grant
|
|
|
|
|
|
|
|
Person
|
2024-08-06 11:54:21 +02:00
|
|
|
username Text
|
S2S: Project: Send ext-Grants to new collab upon getting their delegator-Grant
Until now, adding a direct collaborator to a Project worked exactly like
with components: Invite or Join, then Accept, finally the direct-Grant.
I missed the fact that much like with project-component relationships,
projects (and teams) need to be able to send extension-Grants to their
direct collaborators.
So in Project's Grant handler it now:
- Recognizes the delegator-Grant coming from a new collaborator
- Sends extension-Grants, using the delegator-Grant as the capability
- When getting a new component and sending extension-Grants for it to
direct collaborators, Project uses their delegator-Grants as
capability
And in Project's Accept handler, it no longer sends extension-Grants
(because it doesn't yet have the collaborator's delegator-Grant at this
point).
NOTE, THIS TEMPORARILY BREAKS grant chains: If you create a Project and
add a Deck to it, you won't get an extension-Grant-for-the-Deck from the
Project, because the Project doesn't yet have your delegator-Grant.
The next commits will implement the Person-side of Collab records, and
will cause Person actors to automatically send the delegator-Grant,
fixing the break.
2023-11-22 13:16:08 +01:00
|
|
|
login Text
|
|
|
|
passphraseHash ByteString
|
|
|
|
email EmailAddress
|
|
|
|
verified Bool
|
|
|
|
verifiedKey Text
|
|
|
|
verifiedKeyCreated UTCTime
|
|
|
|
resetPassKey Text
|
|
|
|
resetPassKeyCreated UTCTime
|
|
|
|
actor ActorId
|
|
|
|
-- reviewFollow Bool
|
|
|
|
|
|
|
|
UniquePersonUsername username
|
|
|
|
UniquePersonLogin login
|
|
|
|
UniquePersonEmail email
|
|
|
|
UniquePersonActor actor
|
2024-08-06 11:54:21 +02:00
|
|
|
|
|
|
|
Actor
|
|
|
|
name Text
|
|
|
|
desc Text
|
|
|
|
createdAt UTCTime
|
|
|
|
inbox InboxId
|
|
|
|
outbox OutboxId
|
|
|
|
followers FollowerSetId
|
|
|
|
justCreatedBy ActorId Maybe
|
|
|
|
|
|
|
|
UniqueActorInbox inbox
|
|
|
|
UniqueActorOutbox outbox
|
|
|
|
UniqueActorFollowers followers
|
|
|
|
|
|
|
|
Inbox
|
|
|
|
|
|
|
|
FollowerSet
|