Issue
Jenkins allows granting members (users and groups) Run.Replay
(Run → Replay) permission by using UI:
src="https://i.stack.imgur.com/C0MG5.png" alt="Configure Permissions">
Unfortunately, Run.Replay
permission it is not defined in hudson.model.Run
class. All other permissions are available:
Delete
→Run.DELETE
Update
→Run.UPDATE
Where is defined the hudson.security.Permission
object which represents Run.Replay
permission?
Solution
The permission is introduced by the Pipeline: Groovy plugin. It is defined in the org.jenkinsci.plugins.workflow.cps.replay.ReplayAction
class:
/**
* Attached to a {@link Run} when it could be replayed with script edits.
*/
@SuppressWarnings("rawtypes") // on Run
public class ReplayAction implements Action {
[...]
public static final Permission REPLAY = new Permission(Run.PERMISSIONS, "Replay", Messages._Replay_permission_description(), Item.CONFIGURE, PermissionScope.RUN);
Link to the class located in the 2.78 version: https://github.com/jenkinsci/workflow-cps-plugin/blob/workflow-cps-2.78/src/main/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction.java#L360
Answered By - agabrys
Answer Checked By - Gilberto Lyons (JavaFixing Admin)