Enhance authentication handling

This commit is contained in:
2026-04-06 00:16:52 -04:00
parent 4b2b3d5a9f
commit c276f165f4
2 changed files with 37 additions and 12 deletions

View File

@@ -123,7 +123,12 @@ app.get('/me', async (req, res) => {
}
const user = userResult.rows[0];
// Check if user is active
if (!user.is_active) {
return res.status(403).json({ error: 'Account is inactive' });
}
// Get user permissions
let permissions = [];
if (!user.is_admin) {