Only allow maintainers to initiate a scan
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
064e228226
commit
5f6663675f
@ -16,7 +16,11 @@ const router = express.Router();
|
|||||||
let scanner = null;
|
let scanner = null;
|
||||||
|
|
||||||
router.get("/", function(req, res/*, next*/) {
|
router.get("/", function(req, res/*, next*/) {
|
||||||
console.log("Scanning.");
|
console.log("/scan.");
|
||||||
|
|
||||||
|
if (!req.user.maintainer) {
|
||||||
|
return res.status(401).send("Only maintainers can start a scan");
|
||||||
|
}
|
||||||
|
|
||||||
let responded = false;
|
let responded = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user