Skip to content

✨ User-facing referral invitations: widen abilities beyond platform admins #3945

Description

@PierreBrisorgueil

The invitations module ships a referral reward path (billing.referral) and an account Referrals view, but invitationAbilities only grants manage all to platform admins — regular authenticated users have no ability on Invitation, so the account view is unreachable for them. The groundwork is done: list() is invitedBy-scoped for non-admins and the self-referral guard shipped (#3833).

Scope:

  • Widen invitationAbilities: authenticated users can create Invitation and read their own (invitedBy-scoped); admin keeps manage all. Optional config flag so deployments can keep admin-only.
  • Analytics: emit a redemption event (e.g. invitation_redeemed) + carry invite/referral properties on the signup event (funnel currently unmeasurable).
  • Notify the referrer when an invitation is accepted and a referral reward lands (currently silent ledger credit).
  • Index users.referredBy.

Downstream consumers with billing.referral.enabled pick this up via update-stack.

Created via /dev:issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions