lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.18k stars 59 forks source link

fixed middleware path #203

Closed skull8888888 closed 2 weeks ago

skull8888888 commented 2 weeks ago

[!IMPORTANT] Fix middleware path matcher and add workspace membership check in route.ts.

  • Authorization:
    • Add isCurrentUserMemberOfWorkspace check in POST function in route.ts to ensure user is a member of the workspace.
    • Return 401 Unauthorized if user is not a member.
  • Middleware:
    • Change path matcher in middleware.ts from :path* to :path+ for /api/projects and /project.

This description was created by Ellipsis for 9966bd7acde7ab76fd0e28d746c407ce9456b40b. It will automatically update as commits are pushed.