-
Notifications
You must be signed in to change notification settings - Fork 336
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
[IAC][ENG-6998] Infinite Resubmits For IAC #10937
base: develop
Are you sure you want to change the base?
[IAC][ENG-6998] Infinite Resubmits For IAC #10937
Conversation
18c58cc
to
24a4f0d
Compare
24a4f0d
to
92b8388
Compare
requested_permissions=requested_permissions, | ||
) | ||
node_request.save() | ||
with transaction.atomic(): |
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.
Because the error would happen mid-same, you need this transaction to be able to rollback on error.
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.
One typo, and a question: What happens if the request is not accepted or rejected, but they submit multiple requests for the same node? Does the contributor request show up multiple times in the request for access section of the contributors page? This may be too simple of a fix for this, but I'm not super-familiar with this code, so it may be fine.
|
||
def test_requester_can_resubmit(self, app, project, institutional_admin, url, create_payload): | ||
""" | ||
Test that a requester cannot submit another access request for the same node. |
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.
Test that a requester cannot submit another access request for the same node. | |
Test that a requester can submit another access request for the same node. |
@brianjgeiger Currently a uniqueness constraint ensures their is only ever one request type per requester per node. It is enforced here: https://github.com/CenterForOpenScience/osf.io/blob/develop/osf/migrations/0003_aggregated_runsql_calls.py#L24 it's a raw sql uniqueness constraint. If you look at the code again with that in mind it makes much more sense. |
Okay, so I would guess that they get an error toast in the front end if they try to resubmit to a node where there is an active request for access? |
@brianjgeiger yes it says: |
Purpose
Allows a institutional access user to resubmit node requests. Before curator would get rejected accidently and be banned outside the node without way of making new request, This feature allows admin to update and re-new their request an infinite number of times.
Changes
QA Notes
Please make verification statements inspired by your code and what your code touches.
What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation
Side Effects
Ticket
https://openscience.atlassian.net/browse/ENG-6998