-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
JENKINS-61208 Allow system read to view more admin monitors #4685
Conversation
Test failures are super weird, they pass locally, merged in master and will see what happens on CI |
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.
Approval conditional on TooManyJobsButNoView
comment being addressed.
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.
Thanks!
test/src/test/java/hudson/diagnosis/TooManyJobsButNoViewTest.java
Outdated
Show resolved
Hide resolved
@@ -22,12 +22,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
THE SOFTWARE. | |||
--> | |||
<?jelly escape-by-default='true'?> | |||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form"> | |||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form" xmlns:l="/lib/layout"> | |||
<div id="redirect-error" class="alert alert-danger reverse-proxy__hidden" | |||
data-url="${rootURL}/${it.url}/test" data-context="${rootURL}"> | |||
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}"> | |||
<f:submit name="yes" value="${%More Info}"/> |
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.
Why does this one allow to submit the yes? SYSTEM_READ does have access to view the information the button is redirecting to?
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.
I don't see any problem if a non-admin user can see the More Info button. It's not configuring anything if IIRC
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.
it's a server side redirect to a jenkins.io redirect, https://github.com/timja/jenkins/blob/system-read-more-admin-monitors/core/src/main/java/hudson/diagnosis/ReverseProxySetupMonitor.java#L118-L126
Let's merge this in ~24 hours if there's no negative feedback |
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.
These look good. I'm glad to see the new tests.
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.
Looks good to me. The open comment about lack of Job access is an unlikely edge case IMHO, so I am fine with the PR as is
if (j.hasPermission(Jenkins.ADMINISTER)) { | ||
return j.getViews().size() == 1 && j.getItemMap().size() > THRESHOLD; | ||
} | ||
// SystemRead |
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.
or "Manage" soon, I suspect
the edge case was handled in e2d5b08 |
See JENKINS-61208.
Screenshots
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).