Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2014-06-11 18:29:27 -0400
committerWinston Prakash2014-06-11 18:29:37 -0400
commite6ae2daca8c489f5e047872e527c7eb1dcb39891 (patch)
tree62baa79b2ebf580fd0d0fcdf06518bb17a763a86 /hudson-core/src/main/resources/hudson
parent771b856aa649b7a700ef64ecb0eae28e6c60e910 (diff)
downloadorg.eclipse.hudson.core-e6ae2daca8c489f5e047872e527c7eb1dcb39891.tar.gz
org.eclipse.hudson.core-e6ae2daca8c489f5e047872e527c7eb1dcb39891.tar.xz
org.eclipse.hudson.core-e6ae2daca8c489f5e047872e527c7eb1dcb39891.zip
Fix: 436713 - User with node configure permission cannot mark the node offline
Diffstat (limited to 'hudson-core/src/main/resources/hudson')
-rw-r--r--hudson-core/src/main/resources/hudson/model/AllView/noJob.jelly2
-rw-r--r--hudson-core/src/main/resources/hudson/model/Computer/index.jelly35
-rw-r--r--hudson-core/src/main/resources/hudson/model/Computer/markOffline.jelly6
3 files changed, 23 insertions, 20 deletions
diff --git a/hudson-core/src/main/resources/hudson/model/AllView/noJob.jelly b/hudson-core/src/main/resources/hudson/model/AllView/noJob.jelly
index 5a05ac8a..284ed92c 100644
--- a/hudson-core/src/main/resources/hudson/model/AllView/noJob.jelly
+++ b/hudson-core/src/main/resources/hudson/model/AllView/noJob.jelly
@@ -30,7 +30,7 @@
<j:otherwise>
<!-- Offer anonymous users the chance to login, then they can create jobs. -->
<j:if test="${h.isAnonymous()}">
- ${%login(rootURL, app.securityRealm.loginUrl, request.requestURI)}
+ ${%login(rootURL, app.securityRealm.loginUrl, "/")}
<!-- Also offer them the opportunity to sign-up for an account, if this facility is available. -->
<j:if test="${app.securityRealm.allowsSignup()}">
${%signup}
diff --git a/hudson-core/src/main/resources/hudson/model/Computer/index.jelly b/hudson-core/src/main/resources/hudson/model/Computer/index.jelly
index 22c4548b..c15a4306 100644
--- a/hudson-core/src/main/resources/hudson/model/Computer/index.jelly
+++ b/hudson-core/src/main/resources/hudson/model/Computer/index.jelly
@@ -21,23 +21,24 @@
<st:include page="sidepanel.jelly" />
<l:main-panel>
<!-- temporarily offline switch -->
- <l:isAdmin>
- <div style="float:right">
- <j:choose>
- <j:when test="${it.temporarilyOffline}">
- <form method="post" action="toggleOffline">
- <f:submit value="${%submit.temporarilyOffline}" />
- </form>
- </j:when>
- <j:otherwise>
- <form method="post" action="markOffline">
- <f:submit value="${%submit.not.temporarilyOffline}" />
- </form>
- </j:otherwise>
- </j:choose>
- </div>
- </l:isAdmin>
-
+ <j:choose>
+ <j:when test="${h.hasPermission(it,it.CONFIGURE)}">
+ <div style="float:right">
+ <j:choose>
+ <j:when test="${it.temporarilyOffline}">
+ <form method="post" action="toggleOffline">
+ <f:submit value="${%submit.temporarilyOffline}" />
+ </form>
+ </j:when>
+ <j:otherwise>
+ <form method="post" action="markOffline">
+ <f:submit value="${%submit.not.temporarilyOffline}" />
+ </form>
+ </j:otherwise>
+ </j:choose>
+ </div>
+ </j:when>
+ </j:choose>
<h1>
<img src="${imagesURL}/48x48/${it.icon}" width="48" height="48" alt=""/>
${it.caption}
diff --git a/hudson-core/src/main/resources/hudson/model/Computer/markOffline.jelly b/hudson-core/src/main/resources/hudson/model/Computer/markOffline.jelly
index 16b489e2..af2db6e9 100644
--- a/hudson-core/src/main/resources/hudson/model/Computer/markOffline.jelly
+++ b/hudson-core/src/main/resources/hudson/model/Computer/markOffline.jelly
@@ -20,7 +20,8 @@
<l:layout title="${%title(it.displayName)}">
<st:include page="sidepanel.jelly" />
<l:main-panel>
- <l:isAdmin>
+ <j:choose>
+ <j:when test="${h.hasPermission(it,it.CONFIGURE)}">
<h2>${%title(it.displayName)}</h2>
<p>
${%blurb}
@@ -31,7 +32,8 @@
<f:submit value="${%submit}" />
</p>
</form>
- </l:isAdmin>
+ </j:when>
+ </j:choose>
</l:main-panel>
</l:layout>
</j:jelly>

Back to the top