feat(notifications): send product notifications with a rights check right before each send
This commit is contained in:
1 parent
a856066316
commit
623d41b969
59 files changed
+4125
-1126
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package outbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"lincodex/backend/internal/domain"
|
||||
)
|
||||
|
||||
// NotificationRightsReader reads the standing that the rights checks of
|
||||
// product notifications need. It runs inside the caller's transaction, in
|
||||
// the same transaction that holds the delivery lock, and it locks nothing
|
||||
// itself. It returns the facts of one record only, never an address, a
|
||||
// contact, or the content of a notification.
|
||||
type NotificationRightsReader interface {
|
||||
// InvitationNoticeStanding reads the standing of an invitation notice: the
|
||||
// recipient account, the invitation the recipient is addressed by, the
|
||||
// hiding of the sending organization, and the current publication. A
|
||||
// missing account or invitation is reported as not found, not as an
|
||||
// error.
|
||||
InvitationNoticeStanding(ctx context.Context, recipientUserID, invitationID, organizationID uuid.UUID) (domain.InvitationNoticeStanding, error)
|
||||
}
|
||||
Reference in new issue
Block a user