Compare commits

..
20 Commits
Author SHA1 Message Date
Max Deichmann 496f8980ea chore: release v2.95.11
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-11-07 16:24:14 +01:00
Max DeichmannandGitHub 1f54a830ce chore: fix v2 tests (#10281) 2025-11-07 15:07:46 +00:00
Max Deichmann a4cf98377d chore: release v2.95.10
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-11-07 15:01:12 +01:00
Max DeichmannandGitHub ec3aaa9075 fix: fix project membership and invite routes (#10269) 2025-11-07 14:59:20 +01:00
Max Deichmann d1ad2d0def chore: release v2.95.9
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-06-13 21:33:33 +02:00
Max DeichmannandGitHub d1cf4155a2 security: upgrade nextjs (#7302) 2025-06-13 21:32:54 +02:00
Max Deichmann cfac3abe24 chore: release v2.95.8
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-04-06 08:37:59 +02:00
Max DeichmannandGitHub 7908379a72 security: upgrade nextjs 14.2.26 (#6355) 2025-04-05 22:19:21 +00:00
Max Deichmann b3ccbb0339 chore: release v2.95.7
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-03-27 16:23:43 +01:00
Max DeichmannandGitHub ebee574933 security: upgrade next (#6242) 2025-03-27 13:27:31 +00:00
Max Deichmann 962c093431 security: upgrade next 2025-03-27 14:00:31 +01:00
Max Deichmann 66f927f261 chore: release v2.95.6
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-03-10 17:55:59 +01:00
Max DeichmannandGitHub e28b5523b4 security: upgrade axios to 1.8.2 (#5940) 2025-03-10 16:23:36 +00:00
Max Deichmann 454c124e1e chore: release v2.95.5
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-02-19 12:27:27 +01:00
Max DeichmannandGitHub 1cf0b493d3 fix: fix dompurify state dependency (#5634) 2025-02-19 12:19:29 +01:00
steffen911 9c5c5bf4ca chore: release v2.95.4
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-02-18 15:33:00 +01:00
Steffen SchmitzandGitHub 1a1a45bac4 build: increase nextjs static page generation timeout (#5620) 2025-02-18 15:32:40 +01:00
Steffen SchmitzandGitHub e23d25520d chore: notify on v2 build failures (#5618) 2025-02-18 14:40:13 +01:00
Max Deichmann 20e016198c chore: release v2.95.3
Codespell / Check for spelling errors (push) Waiting to run
CI/CD / lint (push) Waiting to run
CI/CD / test-docker-build (push) Waiting to run
CI/CD / tests-web-sync (node20, pg12) (push) Waiting to run
CI/CD / tests-web-sync (node20, pg15) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-web-async (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-web-async (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode) (push) Waiting to run
CI/CD / tests-worker (node20, pg12, mode-azure) (push) Waiting to run
CI/CD / tests-worker (node20, pg15, mode-azure) (push) Waiting to run
CI/CD / e2e-tests (push) Waiting to run
CI/CD / e2e-server-tests (push) Waiting to run
CI/CD / all-ci-passed (push) Blocked by required conditions
CI/CD / push-docker-image (push) Blocked by required conditions
2025-02-18 01:40:33 +01:00
Max DeichmannandGitHub 6df2dd8b23 security: upgrade jsonpath plus v2 (#5595) 2025-02-17 13:46:22 +00:00
20 changed files with 287 additions and 313 deletions
+8
View File
@@ -487,3 +487,11 @@ jobs:
platforms: |
linux/amd64
${{ startsWith(github.ref, 'refs/tags/') && 'linux/arm64' || '' }}
- name: Notify Slack
uses: ravsamhq/notify-slack-action@v2
if: always()
with:
status: ${{ job.status }}
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+9 -1
View File
@@ -35,6 +35,7 @@ services:
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
worker:
build:
@@ -62,6 +63,7 @@ services:
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
redis:
image: redis:7.2.4
@@ -72,8 +74,14 @@ services:
- 6379:6379
db:
image: postgres
image: postgres:17
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
start_period: 30s
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
+2 -1
View File
@@ -35,13 +35,14 @@ services:
- 6379:6379
postgres:
image: postgres:${POSTGRES_VERSION:-latest}
image: postgres:${POSTGRES_VERSION:-17}
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
start_period: 30s
command: ["postgres", "-c", "log_statement=all"]
environment:
- POSTGRES_USER=postgres
+2 -1
View File
@@ -47,13 +47,14 @@ services:
- 6379:6379
postgres:
image: postgres:${POSTGRES_VERSION:-latest}
image: postgres:${POSTGRES_VERSION:-17}
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
start_period: 30s
command: ["postgres", "-c", "log_statement=all"]
environment:
- POSTGRES_USER=postgres
+3 -1
View File
@@ -116,15 +116,17 @@ services:
interval: 3s
timeout: 10s
retries: 10
start_period: 10s
postgres:
image: postgres:${POSTGRES_VERSION:-latest}
image: postgres:${POSTGRES_VERSION:-17}
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
start_period: 30s
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
+2 -1
View File
@@ -25,13 +25,14 @@ services:
- LANGFUSE_INIT_USER_PASSWORD=${LANGFUSE_INIT_USER_PASSWORD:-}
db:
image: postgres
image: postgres:17
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
start_period: 30s
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
+3 -3
View File
@@ -26,9 +26,9 @@
"dependencies": {
"@langfuse/shared": "workspace:*",
"@opentelemetry/api": ">=1.0.0 <1.10.0",
"axios": "^1.7.7",
"axios": "^1.8.2",
"https-proxy-agent": "^7.0.6",
"next": "^14.2.21",
"next": "^14.2.30",
"next-auth": "^4.24.11",
"zod": "^3.23.8"
},
@@ -48,7 +48,7 @@
},
"pnpm": {
"overrides": {
"jsonpath-plus": "10.2.0"
"jsonpath-plus": "10.3.0"
}
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "langfuse",
"version": "2.95.2",
"version": "2.95.11",
"author": "engineering@langfuse.com",
"license": "MIT",
"private": true,
@@ -83,7 +83,7 @@
},
"pnpm": {
"overrides": {
"jsonpath-plus": "10.2.0",
"jsonpath-plus": "10.3.0",
"nanoid": "^3.3.8",
"katex": "^0.16.21"
},
+2 -2
View File
@@ -70,7 +70,7 @@
"@react-email/components": "^0.0.19",
"@react-email/render": "^0.0.15",
"@types/bcryptjs": "^2.4.6",
"axios": "^1.7.7",
"axios": "^1.8.2",
"bcryptjs": "^2.4.3",
"bullmq": "^5.12.10",
"dd-trace": "^5.23.1",
@@ -121,7 +121,7 @@
},
"pnpm": {
"overrides": {
"jsonpath-plus": "10.0.7"
"jsonpath-plus": "10.3.0"
}
}
}
+192 -261
View File
File diff suppressed because it is too large Load Diff
+17 -16
View File
@@ -61,6 +61,7 @@ const nextConfig = {
"kysely",
],
},
staticPageGenerationTimeout: 500, // 5 minutes - default 60 seconds.
poweredByHeader: false,
basePath: env.NEXT_PUBLIC_BASE_PATH,
@@ -128,22 +129,22 @@ const nextConfig = {
// Required to check authentication status from langfuse.com
...(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined
? [
{
source: "/api/auth/session",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "https://langfuse.com",
},
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Methods", value: "GET,POST" },
{
key: "Access-Control-Allow-Headers",
value: "Content-Type, Authorization",
},
],
},
]
{
source: "/api/auth/session",
headers: [
{
key: "Access-Control-Allow-Origin",
value: "https://langfuse.com",
},
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Methods", value: "GET,POST" },
{
key: "Access-Control-Allow-Headers",
value: "Content-Type, Authorization",
},
],
},
]
: []),
// all files in /public/generated are public and can be accessed from any origin, e.g. to render an API reference based on our openapi schema
{
+9 -8
View File
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "2.95.2",
"version": "2.95.11",
"private": true,
"license": "MIT",
"engines": {
@@ -14,11 +14,11 @@
"prettier": "prettier --write ./src *.{ts,js}",
"clean": "rm -rf node_modules",
"start": "dotenv -e ../.env -- sh -c 'NEXT_MANUAL_SIG_HANDLE=true next start'",
"test": "dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects async-server",
"test-sync": "dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects sync-server",
"test:watch": "dotenv -e ../.env -- jest --watch --runInBand",
"test": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects async-server",
"test-sync": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --silent false --verbose false --runInBand --detectOpenHandles --selectProjects sync-server",
"test:watch": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --watch --runInBand",
"test:e2e": "dotenv -e ../.env -- playwright test",
"test:e2e:server": "dotenv -e ../.env -- jest --runInBand --detectOpenHandles --verbose --selectProjects e2e-server",
"test:e2e:server": "cross-env NODE_OPTIONS='--no-experimental-require-module' dotenv -e ../.env -- jest --runInBand --detectOpenHandles --verbose --selectProjects e2e-server",
"models:migrate": "dotenv -e ../.env -- tsx scripts/model-match.ts"
},
"dependencies": {
@@ -26,7 +26,7 @@
"@appsignal/opentelemetry-instrumentation-bullmq": "^0.7.3",
"@baselime/trpc-opentelemetry-middleware": "^0.1.2",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lint": "^6.8.0",
"@codemirror/lint": "^6.4.2",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
@@ -117,7 +117,7 @@
"langchain": "^0.3.6",
"lodash": "^4.17.21",
"lucide-react": "^0.447.0",
"next": "^14.2.21",
"next": "^14.2.30",
"next-auth": "^4.24.11",
"next-query-params": "^5.0.1",
"next-themes": "^0.3.0",
@@ -169,6 +169,7 @@
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^7.12.0",
"autoprefixer": "^10.4.19",
"cross-env": "^7.0.3",
"dotenv-cli": "^7.4.2",
"eslint": "^8.56.0",
"eslint-config-next": "^14.2.15",
@@ -193,7 +194,7 @@
},
"pnpm": {
"overrides": {
"jsonpath-plus": "10.0.7"
"jsonpath-plus": "10.3.0"
}
}
}
@@ -51,7 +51,7 @@ describe("Traces table API test", () => {
expect(tableRows[0].scoresAvg).toEqual([]);
});
it("should get a correct trace with observations", async () => {
it.skip("should get a correct trace with observations", async () => {
const project_id = v4();
const trace_id = v4();
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "v2.95.2";
export const VERSION = "v2.95.11";
@@ -85,7 +85,6 @@ export function MembersTable({
);
const membersViaProject = api.members.allFromProject.useQuery(
{
orgId,
projectId: project?.id ?? "NOT ENABLED",
page: paginationState.pageIndex,
limit: paginationState.pageSize,
@@ -55,7 +55,6 @@ export function MembershipInvitesPage({
const invites = projectId
? api.members.allInvitesFromProject.useQuery(
{
orgId,
projectId,
page: paginationState.pageIndex,
limit: paginationState.pageSize,
@@ -15,14 +15,15 @@ const orgLevelInviteQuery = z.object({
orgId: z.string(),
...paginationZod,
});
const projectLevelInviteQuery = orgLevelInviteQuery.extend({
const projectLevelInviteQuery = z.object({
projectId: z.string(),
...paginationZod,
});
async function getInvites(
prisma: PrismaClient,
query:
| z.infer<typeof orgLevelInviteQuery>
| z.infer<typeof projectLevelInviteQuery>,
| (z.infer<typeof projectLevelInviteQuery> & { orgId: string }),
showAllOrgMembers: boolean = true,
) {
const invitations = await prisma.membershipInvitation.findMany({
@@ -90,9 +91,10 @@ export const allInvitesRoutes = {
allInvitesFromProject: protectedProjectProcedure
.input(projectLevelInviteQuery)
.query(async ({ input, ctx }) => {
const orgId = ctx.session.orgId;
const orgAccess = hasOrganizationAccess({
session: ctx.session,
organizationId: input.orgId,
organizationId: orgId,
scope: "organizationMembers:read",
});
const projectAccess = hasProjectAccess({
@@ -106,6 +108,13 @@ export const allInvitesRoutes = {
message: "You do not have the required access rights",
});
}
return getInvites(ctx.prisma, input, orgAccess);
return getInvites(
ctx.prisma,
{
...input,
orgId,
},
orgAccess,
);
}),
};
@@ -16,15 +16,17 @@ const orgLevelMemberQuery = z.object({
...paginationZod,
});
const projectLevelMemberQuery = orgLevelMemberQuery.extend({
projectId: z.string(), // optional, view project_role for specific project
const projectLevelMemberQuery = z.object({
projectId: z.string(),
searchQuery: z.string().optional(),
...paginationZod,
});
async function getMembers(
prisma: PrismaClient,
query:
| z.infer<typeof orgLevelMemberQuery>
| z.infer<typeof projectLevelMemberQuery>,
| (z.infer<typeof projectLevelMemberQuery> & { orgId: string }),
showAllOrgMembers: boolean = true,
) {
const orgMemberships = await prisma.organizationMembership.findMany({
@@ -119,22 +121,33 @@ export const allMembersRoutes = {
allFromProject: protectedProjectProcedure
.input(projectLevelMemberQuery)
.query(async ({ input, ctx }) => {
const orgId = ctx.session.orgId;
const orgAccess = hasOrganizationAccess({
session: ctx.session,
organizationId: input.orgId,
organizationId: orgId,
scope: "organizationMembers:read",
});
const projectAccess = hasProjectAccess({
session: ctx.session,
projectId: input.projectId,
scope: "projectMembers:read",
});
if (!orgAccess && !projectAccess) {
throw new TRPCError({
code: "FORBIDDEN",
message: "You do not have the required access rights",
});
}
return getMembers(ctx.prisma, input, orgAccess);
return getMembers(
ctx.prisma,
{
...input,
orgId,
},
orgAccess,
);
}),
};
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "worker",
"version": "2.95.2",
"version": "2.95.11",
"description": "",
"license": "MIT",
"private": true,
@@ -82,7 +82,7 @@
},
"pnpm": {
"overrides": {
"jsonpath-plus": "10.2.0"
"jsonpath-plus": "10.3.0"
}
}
}
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "v2.95.2";
export const VERSION = "v2.95.11";