finished state and role based auth across the full API
This commit is contained in:
@@ -14,7 +14,7 @@ export function requireMemberState(state: MemberState) {
|
||||
if (req.user?.state === state)
|
||||
next();
|
||||
else
|
||||
res.status(403).send("You must be a member of the 17th RBN to access this resource");
|
||||
res.status(403).send(`You must be a ${state} of the 17th RBN to access this resource`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user