Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

remove remaining "conversions"

Steven Tey9353e880a898
diff --git a/apps/web/lib/api/rbac/resources.ts b/apps/web/lib/api/rbac/resources.ts
index 749a2fba07..1e78582b03 100644
--- a/apps/web/lib/api/rbac/resources.ts
+++ b/apps/web/lib/api/rbac/resources.ts
@@ -5,7 +5,6 @@ export const RESOURCE_KEYS = [
"domains",
"tags",
"tokens",
- "conversions",
] as const;
export type ResourceKey = (typeof RESOURCE_KEYS)[number];
@@ -23,7 +22,7 @@ export const RESOURCES: {
{
name: "Analytics",
key: "analytics",
- description: "Read analytics",
+ description: "Create and read analytics events",
},
{
name: "Workspaces",
@@ -40,9 +39,4 @@ export const RESOURCES: {
key: "tags",
description: "Create, read, update, and delete tags",
},
- {
- name: "Conversions",
- key: "conversions",
- description: "Track conversions (customer, lead, sales)",
- },
];
diff --git a/apps/web/lib/api/tokens/scopes.ts b/apps/web/lib/api/tokens/scopes.ts
index 8366c07e1d..4a0da98d11 100644
--- a/apps/web/lib/api/tokens/scopes.ts
+++ b/apps/web/lib/api/tokens/scopes.ts
@@ -93,9 +93,9 @@ export const RESOURCE_SCOPES: {
{
scope: "analytics.write",
roles: ["owner", "member"],
- permissions: ["analytics.write"],
+ permissions: ["analytics.write", "analytics.read"],
type: "write",
- resource: "conversions",
+ resource: "analytics",
},
{
scope: "apis.read",