forked from gongxuegit/tiku-backend.net
feat: harden SaaS authentication and authorization
This commit is contained in:
@@ -4,5 +4,23 @@ public static class TikuPolicies
|
||||
{
|
||||
public const string AuthenticatedUser = "authenticated_user";
|
||||
public const string CurrentTenantMember = "current_tenant_member";
|
||||
public const string TenantBackofficeBootstrap = "tenant_backoffice_bootstrap";
|
||||
public const string PlatformBackofficeBootstrap = "platform_backoffice_bootstrap";
|
||||
public const string Mfa = "mfa";
|
||||
public const string TenantContentManageAllScope = "tenant:content:manage:all_scope";
|
||||
public const string TenantCommerceOperateAllScope = "tenant:commerce:operate:all_scope";
|
||||
|
||||
public const string TenantAdmin = "tenant_admin";
|
||||
|
||||
public static string TenantPermission(string permissionCode)
|
||||
{
|
||||
BackendPermissions.EnsureTenant(permissionCode);
|
||||
return permissionCode;
|
||||
}
|
||||
|
||||
public static string PlatformPermission(string permissionCode)
|
||||
{
|
||||
BackendPermissions.EnsurePlatform(permissionCode);
|
||||
return permissionCode;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user