mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Refactor class User (clean up)
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = async function (req, res, next) {
|
||||
const user = new ServerUser(req.user);
|
||||
const target = await ServerUser.fromSQL(null, req.params.user_id);
|
||||
|
||||
if (requestor.canSee(target)) {
|
||||
if (requestor.canRead(target)) {
|
||||
res.status(200).send(target.toJSON());
|
||||
} else {
|
||||
throw {status: 403, message: "Access denied"};
|
||||
|
||||
Reference in New Issue
Block a user