Skip to content

Commit

Permalink
fix: renames
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt committed Mar 25, 2024
1 parent 835ae77 commit 1a60f14
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions packages/backend/src/api/v1/checklists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const checklists = new Router({
prefix: "/checklists",
})

checklists.get("/", checkAccess("checkLists", "list"), async (ctx: Context) => {
checklists.get("/", checkAccess("checklists", "list"), async (ctx: Context) => {
const { projectId } = ctx.state
// TODO: full zod
const { type } = ctx.query as { type: string }
Expand All @@ -23,7 +23,7 @@ checklists.get("/", checkAccess("checkLists", "list"), async (ctx: Context) => {

checklists.get(
"/:id",
checkAccess("checkLists", "read"),
checkAccess("checklists", "read"),
async (ctx: Context) => {
const { projectId } = ctx.state
const { id } = ctx.params
Expand Down Expand Up @@ -76,7 +76,7 @@ checklists.patch("/:id", async (ctx: Context) => {

checklists.delete(
"/:id",
checkAccess("checkLists", "delete"),
checkAccess("checklists", "delete"),
async (ctx: Context) => {
const { projectId } = ctx.state
const { id } = ctx.params
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/api/v1/radars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const DEFAULT_RADARS = [
params: {
field: "input",
type: "contains",
types: ["person", "location", "email", "cc", "phone", "ssn"],
entities: ["person", "location", "email", "cc", "phone", "ssn"],
},
},
],
Expand All @@ -80,7 +80,7 @@ const DEFAULT_RADARS = [
params: {
field: "input",
type: "contains",
types: ["person", "location", "email", "cc", "phone", "ssn"],
entities: ["person", "location", "email", "cc", "phone", "ssn"],
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/db/0005.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set checks = '[
"params": {
"field": "input",
"type": "contains",
"types": ["person", "location", "email", "cc", "phone", "ssn"]
"entities": ["person", "location", "email", "cc", "phone", "ssn"]
}
}
]'::jsonb
Expand All @@ -37,7 +37,7 @@ set checks = '[
"params": {
"field": "output",
"type": "contains",
"types": ["person", "location", "email", "cc", "phone", "ssn"]
"entities": ["person", "location", "email", "cc", "phone", "ssn"]
}
}
]'::jsonb
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/pages/evaluations/checklists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default function Checklists() {
<Title>Checklists</Title>
</Group>

{hasAccess(user, "checkLists", "create") && (
{hasAccess(user, "checklists", "create") && (
<Button
leftSection={<IconPlus size={12} />}
variant="default"
Expand Down
10 changes: 5 additions & 5 deletions packages/shared/access-control/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ResourceName =
| "prompts"
| "radars"
| "datasets"
| "checkLists"
| "checklists"
| "evaluations"
export type Role = "owner" | "admin" | "member" | "viewer" | "billing"
export type Action =
Expand Down Expand Up @@ -99,7 +99,7 @@ export const roles: Record<
delete: true,
list: true,
},
checkLists: {
checklists: {
create: true,
read: true,
update: true,
Expand Down Expand Up @@ -184,7 +184,7 @@ export const roles: Record<
delete: true,
list: true,
},
checkLists: {
checklists: {
create: true,
read: true,
update: true,
Expand Down Expand Up @@ -266,7 +266,7 @@ export const roles: Record<
delete: true,
list: true,
},
checkLists: {
checklists: {
create: true,
read: true,
update: true,
Expand Down Expand Up @@ -341,7 +341,7 @@ export const roles: Record<
delete: false,
list: true,
},
checkLists: {
checklists: {
create: false,
read: true,
update: false,
Expand Down

0 comments on commit 1a60f14

Please sign in to comment.