mirror of
https://github.com/beilunyang/moemail.git
synced 2026-09-04 23:06:37 +08:00
feat: Add configuration management for default user roles and permissions
This commit is contained in:
@@ -8,6 +8,7 @@ const API_PERMISSIONS: Record<string, Permission> = {
|
||||
'/api/emails': PERMISSIONS.MANAGE_EMAIL,
|
||||
'/api/webhook': PERMISSIONS.MANAGE_WEBHOOK,
|
||||
'/api/roles/promote': PERMISSIONS.PROMOTE_USER,
|
||||
'/api/config': PERMISSIONS.MANAGE_CONFIG,
|
||||
}
|
||||
|
||||
export async function middleware(request: Request) {
|
||||
@@ -43,5 +44,6 @@ export const config = {
|
||||
'/api/emails/:path*',
|
||||
'/api/webhook/:path*',
|
||||
'/api/roles/:path*',
|
||||
'/api/config/:path*',
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user