Skip to content

Commit

Permalink
fix: unable to re-order penal code group positions
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Oct 19, 2023
1 parent 5ff689c commit 78bd661
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/api/src/lib/values/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ export function getPermissionsForValuesRequest(request: Req) {
throw new BadRequest("Must specify `params.path`");
}

if (path.toLowerCase() === "penal_code_group") {
return {
permissions: [Permissions.ManageValuePenalCode],
fallback: (u: User) => u.rank !== Rank.USER,
};
}

const type = getTypeFromPath(path) as ValueType | "ALL";
if (type === "ALL") {
return {
Expand Down

0 comments on commit 78bd661

Please sign in to comment.