feat: allow duplicate file outside context of "current" team#2281
feat: allow duplicate file outside context of "current" team#2281
Conversation
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
Preview - Build & Deploy Images✅ Build images 🕒 Last deployed: Apr 15, 2025 at 05:58 PM UTC |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## qa #2281 +/- ##
==========================================
- Coverage 90.59% 90.59% -0.01%
==========================================
Files 397 397
Lines 88923 88998 +75
==========================================
+ Hits 80564 80631 +67
- Misses 8359 8367 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AyushAgrawal-A2
left a comment
There was a problem hiding this comment.
2 changes requested in
getTeamConnection.test.ts(blocking) - #2281 (comment)requireAuth(optional) - has redundant auth checks, will be great to have only one
|
@AyushAgrawal-A2 great catches, I've resolved both of those. Ready for 👀 again. |
luke-quadratic
left a comment
There was a problem hiding this comment.
Forgot to add approval when I went through this before - followed Jim's exhaustive list of testing
Allow users to duplicate files that are in teams they don't have access to.
Logged out users will see:
Logged in users will see:
When you duplicate a file from the sheet side of the app (or from one of the permission messages you see above), it will duplicate the file to your active team. If you have access to more than one team, it will route you to a page and ask where you want to duplicate the file.
Resolves #2252
Things to test
Duplicating a file
Notes on testing around this feature:
As a logged in user:
As a logged out user:
As a new user:
Ways to duplicate:
Ensure that any connections in a file cannot be run (or their schema viewed) if the connections belong to another team. To test this, do the following:
Routes
Note
This PR changes a lot of the routing, we should ensure all routes work as expected. This includes fixes to exisiting special handling for new users.
This includes URL routes for users coming to the app from the marketing site. We should make sure these work as expected for both existing users and new users after sign up.
/files/create- create a new file/files/create?prompt=draw+a+chart/files/create?example- create a file from an example/education/enroll- check enrollment status in education program/file/:uuid/duplicate- duplicates a file immediately (if you have access — try having two teams and you'll see the team picker when you access this route)/team/*- links directly to pages on team, such as:/team/members/team/settings/team/connectionsConnection permissions
Note
This PR changed the server-side API in relation to connections, so that functionality should be tested