Portal: Admin-Panel, Rechnungsanalyse und alte Admin-Schnittstellen entfernt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a4fa581c0
commit
7c00633db0
43 files changed
+229
-4001
No files matched your search
@@ -58,16 +58,6 @@ export async function requireSession(req, res, next) {
|
||||
next()
|
||||
}
|
||||
|
||||
/** Admin-Session: Ticketsystem-Mitarbeiter (Appwrite-Label "admin") im Portal. */
|
||||
export function requireAdminSession(req, res, next) {
|
||||
const session = parsePortalSession(req)
|
||||
if (!session?.appwriteUserId || session.role !== 'admin') {
|
||||
return res.status(401).json({ error: 'Admin-Anmeldung erforderlich' })
|
||||
}
|
||||
req.session = session
|
||||
next()
|
||||
}
|
||||
|
||||
export function getSessionCustomerId(req) {
|
||||
return req.session?.customerId
|
||||
}
|
||||
Reference in new issue
Block a user