Role-based Security

Install Role-based Plugin

From home page click to Manage Jenkins, then Manage Plugin.

At Manage Plugin page, select tab Available, then typing into filter Role-based Authorization Strategy, click to Install without restart

Configure Global Role

From Manage Jenkins, configure to Configure Global Security, and then at session Authorization select Role-based Strategy option. Then click to Save button.

Now from Manage Jenkins, you will see new item call Manage and Assign Roles

Click to Manage and Assign Roles, UI allow to Manage Roles and Assign Roles will show up

Click to Manage Roles, at Global roles, add dev role with read permission at Overall and full permission with Job, then click to Save

Back to screen Manage Roles and Assign Roles, then click to Assign Roles. Now assign GOL_Developer to dev role. Click to Save

That it, now try to logout from Jenkins and login with user GOL_developer. You will see GOL_developer could see all the job, but could not see Manage Jenkins

Configure Project Role

Currently, GOL_developer could see and access all jobs, You want to configure so GOL_developer only could see GOL project.

From Manage and Assign Roles screen, click to Manage Roles, at Project roles section, add GOL

And then select all permission for GOL role. Click Save button.

From Global roles section, remove all permission related to job and only keep overall read permission.

Now come back to Assign Role screen, then at the Project Role section, add GOL_developer user, and select GOL role for this user. Save configure.

Logout from your admin and login back with GOL_developer. Now you can see that GOL_developer only see GOL project.

results matching ""

    No results matching ""