roles and permissions
This commit is contained in:
parent
d77c3ca1a5
commit
9808100d81
21 changed files with 389 additions and 59 deletions
|
@ -8,7 +8,6 @@ import errorHandler from "../middleware/errorHandler";
|
|||
|
||||
import setup from "./setup";
|
||||
import auth from "./auth";
|
||||
import permission from "./permission";
|
||||
import PermissionHelper from "../helpers/permissionHelper";
|
||||
|
||||
export default (app: Express) => {
|
||||
|
@ -25,6 +24,6 @@ export default (app: Express) => {
|
|||
app.use("/setup", allowSetup, setup);
|
||||
app.use("/auth", auth);
|
||||
app.use(authenticate);
|
||||
app.use("/permission", PermissionHelper.passCheckMiddleware("admin", "user"), permission);
|
||||
app.use("/secured", PermissionHelper.passCheckMiddleware("admin", "user"), (req, res) => {});
|
||||
app.use(errorHandler);
|
||||
};
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
import express from "express";
|
||||
import { getSections } from "../controller/permissionController";
|
||||
|
||||
var router = express.Router({ mergeParams: true });
|
||||
|
||||
router.get("/sections", async (req, res) => {
|
||||
await getSections(req, res);
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue