mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 06:59:33 +02:00
add roles input on resource and make spacing more consistent
This commit is contained in:
parent
8e64b5e0e9
commit
28bae40390
36 changed files with 1235 additions and 724 deletions
|
@ -20,6 +20,7 @@ import {
|
|||
verifyTargetAccess,
|
||||
verifyRoleAccess,
|
||||
verifyUserAccess,
|
||||
verifyUserInRole,
|
||||
} from "./auth";
|
||||
import { verifyUserHasAction } from "./auth/verifyUserHasAction";
|
||||
import { ActionsEnum } from "@server/auth/actions";
|
||||
|
@ -135,12 +136,13 @@ authenticated.post(
|
|||
); // maybe make this /invite/create instead
|
||||
authenticated.post("/invite/accept", user.acceptInvite);
|
||||
|
||||
// authenticated.get(
|
||||
// "/resource/:resourceId/roles",
|
||||
// verifyResourceAccess,
|
||||
// verifyUserHasAction(ActionsEnum.listResourceRoles),
|
||||
// resource.listResourceRoles
|
||||
// );
|
||||
authenticated.get(
|
||||
"/resource/:resourceId/roles",
|
||||
verifyResourceAccess,
|
||||
verifyUserHasAction(ActionsEnum.listResourceRoles),
|
||||
resource.listResourceRoles
|
||||
);
|
||||
|
||||
authenticated.get(
|
||||
"/resource/:resourceId",
|
||||
verifyResourceAccess,
|
||||
|
@ -251,20 +253,15 @@ authenticated.post(
|
|||
// verifyUserHasAction(ActionsEnum.listRoleSites),
|
||||
// role.listRoleSites
|
||||
// );
|
||||
// authenticated.put(
|
||||
// "/role/:roleId/resource",
|
||||
// verifyRoleAccess,
|
||||
// verifyUserInRole,
|
||||
// verifyUserHasAction(ActionsEnum.addRoleResource),
|
||||
// role.addRoleResource
|
||||
// );
|
||||
// authenticated.delete(
|
||||
// "/role/:roleId/resource",
|
||||
// verifyRoleAccess,
|
||||
// verifyUserInRole,
|
||||
// verifyUserHasAction(ActionsEnum.removeRoleResource),
|
||||
// role.removeRoleResource
|
||||
// );
|
||||
|
||||
authenticated.post(
|
||||
"/resource/:resourceId/roles",
|
||||
verifyResourceAccess,
|
||||
verifyRoleAccess,
|
||||
verifyUserHasAction(ActionsEnum.setResourceRoles),
|
||||
role.addRoleResource
|
||||
);
|
||||
|
||||
// authenticated.get(
|
||||
// "/role/:roleId/resources",
|
||||
// verifyRoleAccess,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue