Super-admin role override every rules
This commit is contained in:
parent
194565e962
commit
246e8d4394
@ -18,7 +18,7 @@ export default async function ruleHandler(req: Request, response: Response, next
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rules.includes(req.method + " " + service)) {
|
||||
if (!rules.includes(req.method + " " + service) && role != "super-admin") {
|
||||
response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with those rules");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user