Try adding and removing repos when necessary #983
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses part of #982
This PR has multiple changes centered around modifying effective policies and repositories on an active submission in a workflow. Description of the buggy behavior can be seen in the linked ticket. A few changes were made to get around the issue:
submission.effectivePolicies
every time the Policy step is run based solely on the results of the policy servicesubmission.repositories
to the repo list from the policy service, taking the policy service results as truth.required
will be automatically added to the submission.There is a downside to the approach taken here: if for some reason a user removes a grant from the submission, then clicks Next to save the draft and leaves the workflow, the draft submission will be in a sort of limbo state, where
effectivePolicies
andrepositories
would not have been updated. However, current implementation of editing draft submissions forces the user to step through the entire workflow, so those inaccuracies would be taken care of as soon as they make it to the appropriate step.