@@ -152,6 +152,16 @@ public final class RequestOverrides {
152152 /** Roles exempt from the {@code /users} self-service write restriction (override for multi-team). */
153153 public static final String USERS_UNRESTRICTED_ROLES = "override-accounts-users-unrestricted-roles" ;
154154
155+ /**
156+ * Whether Sign-up Management is enabled for this tenant (override for multi-team).
157+ * When explicitly {@code false}, the {@code /users} self-service write restriction
158+ * is skipped entirely — a tenant that never opted into restheart-accounts never
159+ * opted into its opinions on {@code /users}. Must be set before authentication
160+ * (e.g. {@code REQUEST_BEFORE_EXCHANGE_INIT}), since the veto is evaluated as part
161+ * of authorization, before any {@code REQUEST_AFTER_AUTH} interceptor runs.
162+ */
163+ public static final String SIGNUP_MGMT_ENABLED = "override-accounts-signup-mgmt-enabled" ;
164+
155165 private RequestOverrides () {}
156166
157167 // ── Accessor methods ──────────────────────────────────────────────────────
@@ -219,6 +229,15 @@ public static List<String> usersUnrestrictedRoles(ServiceRequest<?> req, Account
219229 return list (req , USERS_UNRESTRICTED_ROLES , conf .usersUnrestrictedRoles ());
220230 }
221231
232+ /**
233+ * Whether Sign-up Management is enabled for this tenant. Defaults to {@code true}
234+ * (restriction fully enforced) unless a deployment-layer interceptor explicitly
235+ * attaches {@code false}.
236+ */
237+ public static boolean signupMgmtEnabled (ServiceRequest <?> req , AccountsConfigData conf ) {
238+ return bool (req , SIGNUP_MGMT_ENABLED , true );
239+ }
240+
222241 /**
223242 * Per-team Google OAuth config, or {@code null} if not overridden.
224243 * When non-null, this takes precedence over the static {@link OAuthConfig}.
0 commit comments