isInviteeInvitationsOff function
- Object error
Whether error is the database refusing an invitation because the
invited person turned off "Allow organization invitations" in Settings →
Privacy. It is an isAccessDenied error that migration 096 tags with a
hint, so the inviter is told why rather than "You don't have access to
this.". Only someone allowed to invite into the org ever gets it: the
check runs after the invitation policy, so anyone else gets the plain
refusal and the person's setting stays private.
Implementation
bool isInviteeInvitationsOff(Object error) =>
isAccessDenied(error) &&
(error as PostgrestException).hint == 'invitee_invitations_off';