Skip to content

Commit

Permalink
feat: revert user/opco auth (not working) (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevbarns authored Nov 10, 2023
1 parent d2fa1a3 commit e87fb16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion server/src/http/routes/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default (server: Server) => {
"/user/opco",
{
schema: zRoutes.get["/user/opco"],
onRequest: [server.auth(zRoutes.get["/user/opco"])],
// onRequest: [server.auth(zRoutes.get["/user/opco"])],
},
async (req, res) => {
const { opco } = req.query
Expand Down
18 changes: 10 additions & 8 deletions shared/routes/user.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ export const zUserRecruteurRoutes = {
})
.strict(),
},
securityScheme: {
auth: "cookie-session",
access: "user:manage",
ressources: {
user: [{ opco: { type: "query", key: "opco" } }],
recruiter: [{ opco: { type: "query", key: "opco" } }],
},
},
securityScheme: null,
// KBA hotfix: not working
// securityScheme: {
// auth: "cookie-session",
// access: "user:manage",
// ressources: {
// user: [{ opco: { type: "query", key: "opco" } }],
// recruiter: [{ opco: { type: "query", key: "opco" } }],
// },
// },
},
"/user": {
method: "get",
Expand Down

0 comments on commit e87fb16

Please sign in to comment.