Skip to content
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

Remove 'Disable project' button from project view #9287

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions core/src/main/resources/lib/hudson/project/makeDisabled.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,5 @@ THE SOFTWARE.
</form>
</div>
</j:when>
<j:otherwise>
<div align="right">
<form method="post" id="disable-project" action="disable">
<l:hasPermission permission="${it.CONFIGURE}">
<f:submit value="${%Disable Project}" primary="false" />
</l:hasPermission>
</form>
</div>
</j:otherwise>
</j:choose>
</j:jelly>
14 changes: 6 additions & 8 deletions test/src/test/java/hudson/model/ProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,13 @@ public void testDoDisable() throws Exception {

JenkinsRule.WebClient wc = j.createWebClient();
wc.withBasicCredentials(user.getId(), "password");
HtmlPage p = wc.goTo(project.getUrl());

List<HtmlForm> forms = p.getForms();
for (HtmlForm form : forms) {
if ("disable".equals(form.getAttribute("action"))) {
j.submit(form);
}
}
assertTrue("Project should be disabled.", project.isDisabled());
HtmlPage p = wc.getPage(project, "configure");
HtmlForm form = p.getFormByName("config");
form.getInputByName("enable").click();
j.submit(form);

assertTrue("Project should be disabled.", project.isDisabled());
}

@Test
Expand Down
Loading