Skip to content
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

error message when sharing dataset with user #1140

Merged

Conversation

tcnichol
Copy link
Contributor

@tcnichol tcnichol commented Jul 5, 2024

Previously when you shared a dataset with a user, it showed an error message but the user was added.

I have fixed this so now you get the success message.

strange bug - sharing with group shows 2 entries?
@tcnichol tcnichol requested a review from longshuicy as a code owner July 5, 2024 21:57
@tcnichol tcnichol linked an issue Jul 5, 2024 that may be closed by this pull request
@tcnichol tcnichol requested review from lmarini and ddey2 July 5, 2024 21:57
Copy link
Member

@ddey2 ddey2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay.

I was wondering why it was previously needed to explicitly check for user role and verify if the user was added on frontend. Looks like @tcnichol you wrote this code. Do you remember?

@tcnichol tcnichol changed the base branch from main to release/v2.0-beta-3 August 6, 2024 15:46
@tcnichol
Copy link
Contributor Author

This looks okay.

I was wondering why it was previously needed to explicitly check for user role and verify if the user was added on frontend. Looks like @tcnichol you wrote this code. Do you remember?

I think if I didn't do this the page did not show the user that was added correctly.

@tcnichol
Copy link
Contributor Author

I looked at the db here.

Looks like it is working as intended. A user does not have multiple roles on any dataset, their id is removed from the old Authorization object. That object is not deleted because other user_ids might be in that object. If it is empty, then if you add a user with that role, that existing authorization is updated with the user_id added.

@lmarini lmarini merged commit a28c5fb into release/v2.0-beta-3 Aug 30, 2024
6 checks passed
@lmarini lmarini deleted the 1078-error-shown-when-sharing-dataset-with-user branch August 30, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error shown when sharing dataset with user
4 participants