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

Submission Permission fixes #1171

Merged
merged 7 commits into from
Mar 6, 2024
Merged

Submission Permission fixes #1171

merged 7 commits into from
Mar 6, 2024

Conversation

naglepuff
Copy link
Collaborator

@naglepuff naglepuff commented Mar 4, 2024

Fix #1162
Fix #939 (temporary/non-ideal fix)

This PR addresses additional issues with assigning permissions from the UI and adds some UX enhancements like banners and tooltips.

List of Changes

Don't Override PI Owner Role

If the same ORCID iD was used for the PI ORCID and as a contributor ORCID iD, then the permission level set at the contributor level had priority over the ideal PI level (owner). Now, priority is given to the owner role when building the request body to update the submission with new permissions.

Validate address without rendering form

This is a "fix" for #939. The address form now validates by investigating data in addition to through Vuetify's form validation. Vuetify's form validation was insufficient because the address form cannot be validated by it until it is opened. The previous workaround for this was to open the form, which would be validated upon render by Vuetify, and then close the form. Metadata Contributors are unable to do this, and would be stuck at that screen. The only workaround for those users would be to replace /context with /samples in the URL.

The reason this fix is not ideal is because it duplicates validation, so changes to validation rules for this form need to be applied in two different places.

The address form dialog now uses the eager prop, which forces it to render and thus validate when it mounts. (thanks @marySalvi)

Add Permission Level Descriptions

A tooltip has been added to the Study form describing each permission level.
image

Add Banner for read-only views

If a user is presented with a read-only view due to insufficient permissions to edit the current form, a banner now appears informing the user of this.
image

Prevent PI from changing their own ORCID

If the current user is the PI, don't allow them to edit the PI ORCID field on the study form and remove their permission.

@naglepuff naglepuff requested review from marySalvi and mslarae13 March 4, 2024 20:03
This forces validation on the form, fixing the bug that forced users to open the
address form to trigger validation.
@naglepuff naglepuff changed the title Don't override PI owner role Submission Permission fixes Mar 4, 2024
Copy link
Collaborator

@marySalvi marySalvi left a comment

Choose a reason for hiding this comment

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

One minor change but otherwise looks good!

@naglepuff naglepuff merged commit 26f0142 into main Mar 6, 2024
2 checks passed
@naglepuff naglepuff deleted the 1162-permission-level-fixes branch March 6, 2024 21:09
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.

Tooltip/documentation for submission editor roles and permissions EMSL Shipping Validation
2 participants