mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add enterprise Phase 1-4 feature flags and new permissions
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
ENTERPRISE_FEATURES,
|
||||
type EnterpriseFeature,
|
||||
type LicensePayload,
|
||||
PLAN_FEATURES,
|
||||
validateLicense,
|
||||
} from "./license.js";
|
||||
|
||||
@@ -31,4 +32,4 @@ export type S3StorageModule = typeof import("./storage-s3.js");
|
||||
export async function loadS3Storage(): Promise<S3StorageModule> {
|
||||
return import("./storage-s3.js");
|
||||
}
|
||||
export { ENTERPRISE_FEATURES, type EnterpriseFeature, type LicensePayload };
|
||||
export { ENTERPRISE_FEATURES, PLAN_FEATURES, type EnterpriseFeature, type LicensePayload };
|
||||
|
||||
@@ -13,12 +13,31 @@ export const ENTERPRISE_FEATURES = [
|
||||
"audit_export",
|
||||
"mfa",
|
||||
"per_tool_permissions",
|
||||
"siem_forwarding",
|
||||
"tamper_resistant_audit",
|
||||
"legal_hold",
|
||||
"gdpr_lifecycle",
|
||||
"team_retention_overrides",
|
||||
"sso_enforcement",
|
||||
"ip_allowlist",
|
||||
"config_export_import",
|
||||
"upgrade_management",
|
||||
"admin_alerts",
|
||||
] as const;
|
||||
|
||||
export type EnterpriseFeature = (typeof ENTERPRISE_FEATURES)[number];
|
||||
|
||||
export const PLAN_FEATURES: Record<string, readonly EnterpriseFeature[]> = {
|
||||
team: ["saml_sso", "s3_storage", "multi_tenancy"],
|
||||
team: [
|
||||
"saml_sso",
|
||||
"s3_storage",
|
||||
"multi_tenancy",
|
||||
"audit_export",
|
||||
"siem_forwarding",
|
||||
"sso_enforcement",
|
||||
"upgrade_management",
|
||||
"admin_alerts",
|
||||
],
|
||||
enterprise: ENTERPRISE_FEATURES,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user