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

don't require email addresses to match to edit jobs #444

Closed
michamos opened this issue Feb 2, 2024 · 1 comment
Closed

don't require email addresses to match to edit jobs #444

michamos opened this issue Feb 2, 2024 · 1 comment

Comments

@michamos
Copy link
Collaborator

michamos commented Feb 2, 2024

A user reports that he can't edit his job post: https://cern.service-now.com/nav_to.do?uri=%2Fu_request_fulfillment.do%3Fsys_id%3D7d5c1665c3c082102fec1bddd40131d9%26sysparm_view%3Dtabs_new%26sysparm_domain%3Dnull%26sysparm_domain_scope%3Dnull. After investigating, it turns out that the check in https://github.com/inspirehep/inspirehep/blob/cd81c540c65175d3f9a6a45bdc847e8dcc945ea2/backend/inspirehep/submissions/views.py#L528-L533 is wrong. Email addresses can change, so we shouldn't require them to match. The ORCID check is sufficient.

Additionally, it might make sense to refactor this to align it with the similar permission check in https://github.com/inspirehep/inspirehep/blob/cd81c540c65175d3f9a6a45bdc847e8dcc945ea2/backend/inspirehep/records/marshmallow/jobs/ui.py#L25-L53 which determines whether the edit button gets displayed.

@drjova
Copy link
Contributor

drjova commented Mar 15, 2024

@michamos with this change we have some cases that are failing for example:

https://github.com/inspirehep/inspirehep/blob/e273b52138ab6de99f37bf7197e441c2b527d791/backend/tests/integration/submissions/test_submissions_views.py#L1439-L1440

I guess these are wrong assumptions from the beginning, some of them are:

  • we don't have a flow that a curator will create a job and then the user will edit it
  • users without orcid adding jobs

drjova added a commit to inspirehep/inspirehep that referenced this issue Mar 15, 2024
@michamos michamos closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants