Skip to content
Permalink
Browse files

Merge pull request #6 from synopsys-arc-oss/jenkins_18978_slave_perm_…

…groups

[JENKINS-18978] - Modified filtering of permission groups for the slaves.
  • Loading branch information...
oleg-nenashev committed May 28, 2014
2 parents a26e5d2 + 6c2e145 commit 0fe3af8c6a651cd3b69542cb3fb5d16268c46882
@@ -5,4 +5,5 @@ work
.settings
.classpath
.project
/nb-configuration.xml
/nb-configuration.xml
/work - Copy
@@ -41,7 +41,10 @@
import hudson.model.Hudson;
import hudson.model.Item;
import hudson.model.Job;
import hudson.model.Project;
import hudson.model.Run;
import hudson.model.View;
import hudson.scm.SCM;
import hudson.security.ACL;
import hudson.security.AccessControlled;
import hudson.security.AuthorizationStrategy;
@@ -570,8 +573,15 @@ else if(type.equals(PROJECT)) {
groups.remove(PermissionGroup.get(View.class));
}
else if (type.equals(SLAVE)) {
groups = new ArrayList<PermissionGroup>();
groups.add(PermissionGroup.get(Computer.class));
groups = new ArrayList<PermissionGroup>(PermissionGroup.getAll());
groups.remove(PermissionGroup.get(Permission.class));
groups.remove(PermissionGroup.get(Hudson.class));
groups.remove(PermissionGroup.get(View.class));

// Project, SCM and Run permissions
groups.remove(PermissionGroup.get(Item.class));
groups.remove(PermissionGroup.get(SCM.class));
groups.remove(PermissionGroup.get(Run.class));
}
else {
groups = null;

0 comments on commit 0fe3af8

Please sign in to comment.
You can’t perform that action at this time.