-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Alpha should not be able to edit datasets that they don't own #19854
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19854 +/- ##
==========================================
- Coverage 66.51% 66.36% -0.16%
==========================================
Files 1690 1714 +24
Lines 64614 65031 +417
Branches 6655 6717 +62
==========================================
+ Hits 42978 43157 +179
- Misses 19936 20167 +231
- Partials 1700 1707 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@hughhhh Looking good! Only thing I'm seeing is the disabled button shouldn't have a hover state (it should remain grey even when the user hovers) |
48a4cd1
to
c1f4ff1
Compare
c1f4ff1
to
eae6a1a
Compare
252d70c
to
6663bc3
Compare
6663bc3
to
6d5e269
Compare
/testenv up |
@yousoph Ephemeral environment spinning up at http://34.222.236.159:8080. Credentials are |
930f335
to
2815838
Compare
@@ -344,6 +365,11 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({ | |||
}, | |||
{ | |||
Cell: ({ row: { original } }: any) => { | |||
// Verify owner or isAdmin | |||
const allowEdit = | |||
original.owners.map((o: any) => o.id).includes(user.userId) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add Owners
to for loop
9ee57c1
to
c409a23
Compare
/testenv up |
@yousoph Ephemeral environment spinning up at http://35.165.228.74:8080. Credentials are |
Ephemeral looks good to me (and design + QA took a look as well) :) |
tested in the ephermal env, primary contributor can not edit/delete the dataset they did not own. LGTM! |
72a96cf
to
206e288
Compare
039c751
to
d33cc8b
Compare
Ephemeral environment shutdown and build artifacts deleted. |
…pache#19854) * fix api for checking owners * fix styles for disabling * fix styles for disabling * fix lint * fix lint * add owners key * plzz * remove * update test * add tooltip * add type * fix test * fix user reference * lit * fix test * work (cherry picked from commit 8b15b68)
🏷️ preset:2022.17 |
…pache#19854) * fix api for checking owners * fix styles for disabling * fix styles for disabling * fix lint * fix lint * add owners key * plzz * remove * update test * add tooltip * add type * fix test * fix user reference * lit * fix test * work
…pache#19854) * fix api for checking owners * fix styles for disabling * fix styles for disabling * fix lint * fix lint * add owners key * plzz * remove * update test * add tooltip * add type * fix test * fix user reference * lit * fix test * work
SUMMARY
There is no longer a config value for
OLD_API_CHECK_DATASET_OWNERSHIP
due to 2.0 release. This is now allowing all users who have write permissions to edit any dataset. Adding this logic will verify if this user is an admin or owner before completing this request.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-04-26.at.1.01.03.PM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION