mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Update User settings pages interface (#27526)
This commit is contained in:
1 parent
4386cf394a
commit
961bec5def
8 files changed
+18
-22
No files matched your search
@@ -59,7 +59,7 @@ public abstract class UserPropertyCategoryAction {
|
||||
|
||||
this.targetUser.save();
|
||||
|
||||
// we are in /user/<userLogin>/<category>/, going to /user/<userLogin>/
|
||||
FormApply.success("..").generateResponse(req, rsp, this);
|
||||
// we are in /user/<userLogin>/<category>/, staying there
|
||||
FormApply.success(".").generateResponse(req, rsp, this);
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
|
||||
<l:layout permission="${app.ADMINISTER}" title="${%title}">
|
||||
<st:include page="sidepanel.jelly" it="${it.targetUser}" />
|
||||
<l:main-panel>
|
||||
<l:main-panel width="narrow">
|
||||
<l:app-bar title="${%title}" />
|
||||
|
||||
<f:form method="post" action="configSubmit" name="config" class="jenkins-form">
|
||||
@@ -61,9 +61,8 @@ THE SOFTWARE.
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
|
||||
<f:saveApplyBar/>
|
||||
<f:saveBar/>
|
||||
</f:form>
|
||||
<st:adjunct includes="lib.form.confirm" />
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
+2
-3
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
|
||||
<l:layout permission="${app.ADMINISTER}" title="${%title}">
|
||||
<st:include page="sidepanel.jelly" it="${it.targetUser}" />
|
||||
<l:main-panel>
|
||||
<l:main-panel width="narrow">
|
||||
<l:app-bar title="${%title}" />
|
||||
|
||||
<f:form method="post" action="configSubmit" name="config" class="jenkins-form">
|
||||
@@ -54,14 +54,13 @@ THE SOFTWARE.
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
|
||||
<f:saveApplyBar/>
|
||||
<f:saveBar/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<l:notice title="${%warningNoItems}" icon="symbol-brush-outline" />
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</f:form>
|
||||
<st:adjunct includes="lib.form.confirm" />
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
+2
-3
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
|
||||
<l:layout permission="${app.ADMINISTER}" title="${%title}">
|
||||
<st:include page="sidepanel.jelly" it="${it.targetUser}" />
|
||||
<l:main-panel>
|
||||
<l:main-panel width="narrow">
|
||||
<l:app-bar title="${%title}" />
|
||||
|
||||
<f:form method="post" action="configSubmit" name="config">
|
||||
@@ -61,9 +61,8 @@ THE SOFTWARE.
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
<f:saveApplyBar/>
|
||||
<f:saveBar/>
|
||||
</f:form>
|
||||
<st:adjunct includes="lib.form.confirm" />
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
+2
-3
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
|
||||
<l:layout permission="${app.ADMINISTER}" title="${%title}">
|
||||
<st:include page="sidepanel.jelly" it="${it.targetUser}" />
|
||||
<l:main-panel>
|
||||
<l:main-panel width="narrow">
|
||||
<l:app-bar title="${%title}" />
|
||||
|
||||
<f:form method="post" action="configSubmit" name="config">
|
||||
@@ -61,9 +61,8 @@ THE SOFTWARE.
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
<f:saveApplyBar/>
|
||||
<f:saveBar/>
|
||||
</f:form>
|
||||
<st:adjunct includes="lib.form.confirm" />
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
+2
-3
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:f="/lib/form">
|
||||
<l:layout permission="${app.ADMINISTER}" title="${%title}">
|
||||
<st:include page="sidepanel.jelly" it="${it.targetUser}" />
|
||||
<l:main-panel>
|
||||
<l:main-panel width="narrow">
|
||||
<l:app-bar title="${%title}" />
|
||||
|
||||
<f:form method="post" action="configSubmit" name="config">
|
||||
@@ -62,9 +62,8 @@ THE SOFTWARE.
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
<f:saveApplyBar/>
|
||||
<f:saveBar/>
|
||||
</f:form>
|
||||
<st:adjunct includes="lib.form.confirm" />
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
+4
-4
@@ -39,9 +39,9 @@ THE SOFTWARE.
|
||||
<table class="jenkins-table sortable jenkins-!-margin-0 experimental-flags-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>${%FlagDisplayName}</th>
|
||||
<th width="45%">${%FlagDescription}</th>
|
||||
<th>${%FlagConfig}</th>
|
||||
<th width="25%">${%FlagDisplayName}</th>
|
||||
<th>${%FlagDescription}</th>
|
||||
<th width="25%">${%FlagConfig}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -49,7 +49,7 @@ THE SOFTWARE.
|
||||
<j:set var="flagValue" value="${userProperty.getFlagValue(flagConfig.flagKey)}"/>
|
||||
<tr>
|
||||
<td>
|
||||
${flagConfig.displayName}<span class="jenkins-label jenkins-label--tertiary jenkins-!-padding-left-1">${flagConfig.flagKey}</span>
|
||||
${flagConfig.displayName}<div class="jenkins-label jenkins-label--tertiary">${flagConfig.flagKey}</div>
|
||||
</td>
|
||||
<td>
|
||||
<st:include it="${flagConfig}" page="${flagConfig.flagDescriptionPage}"/>
|
||||
|
||||
@@ -27,6 +27,7 @@ package hudson.model;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.empty;
|
||||
import static org.hamcrest.Matchers.endsWith;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
@@ -426,7 +427,7 @@ class UserTest {
|
||||
SecurityContextHolder.getContext().setAuthentication(user.impersonate2());
|
||||
HtmlForm form = j.createWebClient().withBasicCredentials(user.getId(), "password").goTo(user2.getUrl() + "/account/").getFormByName("config");
|
||||
form.getInputByName("_.fullName").setValue("Alice Smith");
|
||||
j.submit(form);
|
||||
assertThat(j.submit(form).getUrl().getPath(), endsWith(user2.getUrl() + "/account/"));
|
||||
assertEquals("Alice Smith", user2.getFullName(), "User should have full name Alice Smith.");
|
||||
SecurityContextHolder.getContext().setAuthentication(user2.impersonate2());
|
||||
try (JenkinsRule.WebClient webClient = j.createWebClient().withBasicCredentials(user2.getId(), "password")) {
|
||||
|
||||
Reference in new issue
Block a user