WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void grantDisabledPermissionTest(JenkinsRule r) throws Exception {
RoleMap roleMap = new RoleMap();
Role adminRole = new Role("admin-role", new HashSet<>(Collections.singletonList(Jenkins.ADMINISTER)));
roleMap.addRole(adminRole);
Role manage = new Role("manage-role", new HashSet<>(Collections.singletonList(Jenkins.MANAGE)));
Role manage = new Role("system-read-role", new HashSet<>(Collections.singletonList(Jenkins.SYSTEM_READ)));
roleMap.addRole(manage);
roleMap.assignRole(adminRole, "admin");
roleMap.assignRole(manage, "alice");
Expand All @@ -39,7 +39,7 @@ void grantDisabledPermissionTest(JenkinsRule r) throws Exception {
r.jenkins.setAuthorizationStrategy(new RoleBasedAuthorizationStrategy(constructorArg));

try (ACLContext ctx = ACL.as2(User.get("alice").impersonate2())) {
assertFalse(Jenkins.get().hasPermission(Jenkins.MANAGE));
assertFalse(Jenkins.get().hasPermission(Jenkins.SYSTEM_READ));
}
}
}
Loading