Raise default permissions of JUnit5JenkinsRule
#910
Merged
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.
Fixes #901
This PR raises the default permissions of
JUnit5JenkinsRule
to align with their JUnit4 counterparts.It is important to notice that this change is breaking and will cause some JUnit5 based plugin tests to fail in case they rely on the fact that the default user / permission is
Unauthenticated
.The alternative would be to leave the permissions as they are but make users aware of the differences in JUnit4 and JUnit5.
Migration
JUnit5 based tests may fail due to this change (as they expect to run in an
Unauthenticated
context) - like for example:To restore the previous behavior tests need to explicitly impersonate an
ANONYMOUS
user like so:Testing done
Added
org.jvnet.hudson.test.JenkinsRulePermissionTest
to validate the behavior.Submitter checklist