mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-05 02:24:59 +02:00
Ensure the user's actions
This commit is contained in:
parent
143a3b756e
commit
4fc630cf42
9 changed files with 74 additions and 63 deletions
|
@ -18,12 +18,6 @@ export async function getUser(req: Request, res: Response, next: NextFunction):
|
|||
return next(createHttpError(HttpCode.UNAUTHORIZED, "User not found"));
|
||||
}
|
||||
|
||||
// // Check if the user has permission to list sites
|
||||
// const hasPermission = await checkUserActionPermission(ActionsEnum.getUser, req);
|
||||
// if (!hasPermission) {
|
||||
// return next(createHttpError(HttpCode.FORBIDDEN, 'User does not have permission to list sites'));
|
||||
// }
|
||||
|
||||
const user = await db.select()
|
||||
.from(users)
|
||||
.where(eq(users.id, userId))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue