Skip to content

Commit

Permalink
[JENKINS-71734] fix documentation (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
mawinter69 authored Jul 29, 2023
2 parents 435e6b3 + ba78a96 commit f4495e3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,16 @@ Set<Permission> permissions = new HashSet<>();
permissions.add(Jenkins.ADMINISTER)
Role adminRole = new Role("admin", permissions)
/* assign admin role to user 'admin' */
adminRole.addPermissionEntry(new PermissionEntry(AuthorizationType.USER, 'admin'))
/* assign admin role to group 'administrators' */
adminRole.addPermissionEntry(new PermissionEntry(AuthorizationType.GROUP, 'administrators'))
globalRoleMap = rbas.getRoleMap(RoleType.Global)
globalRoleMap.addRole(adminRole)
/* assign admin role to user 'admin' */
globalRoleMap.assignRole(adminRole, new PermissionEntry(AuthorizationType.USER, 'admin'))
/* assign admin role to group 'administrators' */
globalRoleMap.assignRole(adminRole, new PermissionEntry(AuthorizationType.GROUP, 'administrators'))
jenkins.setAuthorizationStrategy(rbas)
jenkins.save()```
jenkins.save()
```
## License

[MIT License](./LICENSE.md)
Expand Down

0 comments on commit f4495e3

Please sign in to comment.