From 0cbd05661bfee453e39fb1e0b679863455519d2c Mon Sep 17 00:00:00 2001 From: Jade Komrij <69873464+goobed@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:44:24 -0700 Subject: [PATCH] Update RBAC_Example.groovy --- RBAC_Example.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RBAC_Example.groovy b/RBAC_Example.groovy index 79d73c6..e69aa8f 100644 --- a/RBAC_Example.groovy +++ b/RBAC_Example.groovy @@ -56,11 +56,11 @@ rc.doRevokePermissions("hudson.model.Hudson.Read") println 'create a new groups at different container levels' // Get location for ClientMaster -locationCM = Jenkins.get().getAllItems().find{it.name.equals("ClientMaster")} +locationCM = Jenkins.instance.getAllItems().find{it.name.equals("ClientMaster")} // Get location for a FolderA/FolderB -locationFolder = Jenkins.get.getAllItems().find{it.fullName.equals("FolderA/FolderB")} +locationFolder = Jenkins.instance.getAllItems().find{it.fullName.equals("FolderA/FolderB")} // Get location at Root Level -locationRoot = Jenkins.get() +locationRoot = Jenkins.instance // For the following example the group is created at root container (locationRoot) String groupName = "newGroup"