isRecipientSharingOff function

bool isRecipientSharingOff(
  1. Object error
)

Whether error is the database refusing a share because the recipient turned off "Allow curriculum sharing" in Settings → Privacy. Like isInviteeInvitationsOff: tagged by migration 096, and only the curriculum's owner, who may share it, ever gets it.

Implementation

bool isRecipientSharingOff(Object error) =>
    isAccessDenied(error) &&
    (error as PostgrestException).hint == 'recipient_sharing_off';