mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Add role aware updates & endpoints
This commit is contained in:
@@ -35,7 +35,7 @@ export async function deleteSite(req: Request, res: Response, next: NextFunction
|
||||
// Check if the user has permission to list sites
|
||||
const hasPermission = await checkUserActionPermission(ActionsEnum.deleteSite, req);
|
||||
if (!hasPermission) {
|
||||
return next(createHttpError(HttpCode.FORBIDDEN, 'User does not have permission to list sites'));
|
||||
return next(createHttpError(HttpCode.FORBIDDEN, 'User does not have permission to perform this action'));
|
||||
}
|
||||
|
||||
// Delete the site from the database
|
||||
|
||||
Reference in New Issue
Block a user