rights system

This commit is contained in:
Matthias Hochmeister
2026-03-23 12:18:46 +01:00
parent fa10467f21
commit 725d4d1729
5 changed files with 49 additions and 1 deletions

View File

@@ -76,6 +76,21 @@ class PermissionController {
}
}
/**
* DELETE /api/admin/permissions/group/:groupName
* Removes a group and all its permissions from the matrix.
*/
async deleteGroup(req: Request, res: Response): Promise<void> {
try {
const groupName = req.params.groupName as string;
await permissionService.deleteGroup(groupName);
res.json({ success: true, message: 'Gruppe entfernt' });
} catch (error) {
logger.error('Failed to delete group', { error });
res.status(500).json({ success: false, message: 'Fehler beim Entfernen der Gruppe' });
}
}
/**
* PUT /api/admin/permissions/bulk
* Bulk-update permissions for multiple groups in one request.