Configuring Authorization - Matrix-based security
In the Authorization
section, we can Matrix-based security
so that we can configure who can do what. We can configure predefined roles available in Jenkins.
Getting ready
Select Matrix-based security
and add a name in the User/grou
box. Make sure that you give access to p
to addadmin
before saving it; otherwise, the Jenkins account will be locked out:

How to do it...
- Give the name of our newly created user, click on
Add
, and provide all the required rights. We can do the same thing for different users. - Click on
Save
:

- To verify the access, open a new incognito window in the browser and log in with the
User
andPassword
of the newly created user:

- Verify that the limited access is available to the new user. The
New Item
andManage Jenkins
links are not available:

- Now go to
Manage Jenkins
|Global Security Configuration
. AllowRead
rights in theJob
category for the userShreyansh
. - Click on
Save
:

- Go to the incognito window that we opened before and refresh...