Complete the code to enable Matrix-based security in Jenkins configuration.
hudson.security.AuthorizationStrategy strategy = new [1]();The GlobalMatrixAuthorizationStrategy enables matrix-based security in Jenkins, allowing fine-grained permission control.
Complete the code to assign the 'admin' role to a user in Role-Based Authorization Strategy.
roleBasedStrategy.assignRole("admin", [1]);
The userName string identifies the user to assign the role in Jenkins Role-Based Authorization Strategy.
Fix the error in this snippet that sets permissions for a role in Role-Based Authorization Strategy.
role.setPermissions([1]);The Administer permission is required to grant full admin rights in Jenkins Role-Based Authorization Strategy.
Fill both blanks to create a new role with admin permissions and add it to the Role-Based Authorization Strategy.
Role [1] = new Role("admin", [2]); roleBasedStrategy.addRole([1]);
The role variable is named adminRole and it is created with the Administer permission to grant full rights.
Fill all three blanks to configure Role-Based Authorization Strategy: create a role, assign permissions, and add a user.
Role [1] = new Role("developer", [2]); roleBasedStrategy.addRole([1]); roleBasedStrategy.assignRole("developer", [3]);
The role variable is devRole, assigned the Build permission, and the role is assigned to a user identified by userName.