Skip to main content

JoinPolicy

Overview

A join policy defines how a user can join an organization. It consists of a set of rules that specify the conditions under which a user is allowed to join. Each rule has a type and associated configuration and a boolean flag indicating whether the rule is enabled. If rules are not enabled by setting allowRequests to false, users will not be able to request to join the organization.

Rule Types

Currently, the only supported rule type is EMAIL_PATTERN, which allows users to join based on their email address matching specified patterns.

EMAIL_PATTERN Rule

The EMAIL_PATTERN rule allows users to join an organization if their email address matches one of the specified patterns. The configuration for this rule includes:

  • patterns: An array of string patterns. An empty array means that there are no restrictions, and any email address is allowed.
  • mode: The matching mode for the patterns. It can be either glob (default) or regex.

Note: Email patterns are evaluated in a non-case-sensitive manner.