feat: Gitea Webhook, IMAP, Settings & Deployment docs
- Webhook route and Gitea integration - IMAP service and Nextcloud/Porkbun setup docs - Settings UI improvements and API updates - SSH/Webhook fix prompt for emailsorter.webklar.com - Bootstrap, config and AI sorter updates
This commit is contained in:
@@ -75,6 +75,18 @@ export const config = {
|
||||
emailAccounts: 1,
|
||||
autoSchedule: false, // manual only
|
||||
},
|
||||
|
||||
// Admin: comma-separated list of emails with admin rights (e.g. support)
|
||||
adminEmails: (process.env.ADMIN_EMAILS || '')
|
||||
.split(',')
|
||||
.map((e) => e.trim().toLowerCase())
|
||||
.filter(Boolean),
|
||||
|
||||
// Gitea Webhook (Deployment)
|
||||
gitea: {
|
||||
webhookSecret: process.env.GITEA_WEBHOOK_SECRET || '',
|
||||
webhookAuthToken: process.env.GITEA_WEBHOOK_AUTH_TOKEN || process.env.GITEA_WEBHOOK_SECRET || '',
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,4 +153,12 @@ export const features = {
|
||||
ai: () => Boolean(config.mistral.apiKey),
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an email has admin rights (support, etc.)
|
||||
*/
|
||||
export function isAdmin(email) {
|
||||
if (!email || typeof email !== 'string') return false
|
||||
return config.adminEmails.includes(email.trim().toLowerCase())
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
Reference in New Issue
Block a user