Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Feb 15, 2020
1 parent 042dc75 commit 58a3f01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
5 changes: 2 additions & 3 deletions core/src/main/resources/hudson/model/Messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ Hudson.AdministerPermission.Description=\
as well as perform highly sensitive operations that amounts to full local system access \
(within the scope granted by the underlying OS.)
Jenkins.Manage.Description=\
This permission grants the ability to make non Permission escalating system \
configuration changes. \
System configuration which would allow the execution of arbitrary commands or code on the master requires Administer.
This permission grants the ability to configure parts of the overall system configuration \
that are not expected to impact the overall stability and security of the system.
Hudson.ReadPermission.Description=\
The read permission is necessary for viewing almost all pages of Jenkins. \
This permission is useful when you don\u2019t want unauthenticated users to see \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,25 @@
* As Jenkins.MANAGE can be enabled on startup with jenkins.security.ManagePermission property, we need a test class
* with this property activated.
*/
// TODO move tests to indicated test classes when we no longer need to set the system property
public class JenkinsManagePermissionTest {

@Rule
public JenkinsRule j = new JenkinsRule();

@BeforeClass //TODO: remove once Jenkins.MANAGE is no longer an experimental feature
@BeforeClass
public static void enableManagePermission() {
System.setProperty("jenkins.security.ManagePermission", "true");
}

@AfterClass //TODO: remove once Jenkins.MANAGE is no longer an experimental feature
@AfterClass
public static void disableManagePermission() {
System.clearProperty("jenkins.security.ManagePermission");
}


// -----------------------------
//Moved from DisablePluginCommandTest
// DisablePluginCommandTest
@Issue("JENKINS-60266")
@Test
@WithPlugin({ "depender-0.0.2.hpi", "dependee-0.0.2.hpi"})
Expand Down Expand Up @@ -91,11 +92,11 @@ private void assertPluginEnabled(String name) {
assertTrue(plugin.isEnabled());
}

// End of Moved from DisablePluginCommandTest
// End of DisablePluginCommandTest
//-------

// -----------------------------
//Moved from ComputerTest
//ComputerTest
@Issue("JENKINS-60266")
@Test
public void dumpExportTableForbiddenWithoutAdminPermission() throws Exception {
Expand All @@ -111,11 +112,11 @@ public void dumpExportTableForbiddenWithoutAdminPermission() throws Exception {
j.createWebClient().login(MANAGER).assertFails("computer/(master)/dumpExportTable", HttpURLConnection.HTTP_FORBIDDEN);
}

// End of Moved from ComputerTest
// End of ComputerTest
//-------

// -----------------------------
//Moved from HusdonTest
// HusdonTest
@Issue("JENKINS-60266")
@Test
public void someGlobalConfigurationIsNotDisplayedWithManagePermission() throws Exception {
Expand Down Expand Up @@ -209,6 +210,6 @@ public void describeMismatch(Object item, Description description) {
};
}

// End of Moved from HusdonTest
// End of HusdonTest
//-------
}

0 comments on commit 58a3f01

Please sign in to comment.