2

I want a block some jobs for a user level for example I have 3 jobs:

Job1 (All the register user can execute this). Job2 (Only some user can execute this) Job3 (All the register user can execute this).

davdomin
  • 1,219
  • 6
  • 18
  • 38

4 Answers4

4

Set the Global Security (http://<your_server>/configureSecurity/?) to the configuration that matches most jobs (enable Job Build) and then enable Project-based security for the other jobs (via the jon configuration) and set up as required by disabling Job Build.

Enter the user name in User/group to add: and then configure as required. In this case I've limited control to two users

enter image description here

GrahamA
  • 5,875
  • 29
  • 39
  • 1
    @DavidDominguez enable Job Build in Global Security and then disable it for the project – GrahamA Jan 13 '14 at 21:22
  • Role-Based Strategy official documentation (https://wiki.jenkins-ci.org/display/JENKINS/Role+Strategy+Plugin) does not help me in anything. This is real example of a great documentation: http://www.kblearningacademy.com/configure-role-strategy-plugin-in-jenkins/ – JRichardsz Jul 21 '16 at 23:46
  • This doesn't work in 1.658 from the docs… ACLs are additive, so the access rights granted below will be effective for all the projects. – Clintm Apr 24 '18 at 22:53
2

You need to use Project-based Matrix Authorization Strategy to achieve this. Hudson/Jenkin >> Manage Hudson >> Configre Security >> Authorization, and select Project-based Matrix Authorization Strategy. Now in the configuration page of each job you will have an option Enable job-based security. You can give access permissions for the users here.

Dipu H
  • 2,372
  • 15
  • 24
0

This works for me : Role Strategy Plugin

But you need understand it and its official documentation is poor, so go to :

https://stackoverflow.com/a/38516162/3957754

Community
  • 1
  • 1
JRichardsz
  • 14,356
  • 6
  • 59
  • 94
0

The below link provides the clear guideline to grant/restrict the access to Jenkins Jobs. http://www.kblearningacademy.com/configure-role-strategy-plugin-in-jenkins/ Its very useful & am able to do the same.

Rajeswari
  • 71
  • 2
  • 11
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – thewaywewere Jun 13 '17 at 04:52