Post-save share-notification dispatcher for extended permission entities. Call immediately after super.Save(options) returns true:
super.Save(options)
true
const saved = await super.Save(options);if (saved) { await dispatchShareNotificationAfterSave(this, isNewShare, async (provider, grantorId) => { return { Provider: provider, ContextUser: this.ContextCurrentUser, … }; });}return saved; Copy
const saved = await super.Save(options);if (saved) { await dispatchShareNotificationAfterSave(this, isNewShare, async (provider, grantorId) => { return { Provider: provider, ContextUser: this.ContextCurrentUser, … }; });}return saved;
Handles the boilerplate each previous implementation repeated:
ProviderType !== 'Database'
isNewShare === false
payloadBuilder
null
void CreateShareNotification(...)
Post-save share-notification dispatcher for extended permission entities. Call immediately after
super.Save(options)returnstrue:Handles the boilerplate each previous implementation repeated:
ProviderType !== 'Database')isNewShare === false)payloadBuilderreturnnullto skip (e.g., Role-grantee ACRs)void CreateShareNotification(...)— notification failures never fail the save.