You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询Jenkins中Run.Replay权限对应的Permission对象定义位置

Where is the Run.Replay Permission Defined in Jenkins?

Great question! You’re absolutely right to notice that Run.Replay doesn’t exist in Jenkins core’s hudson.model.Run class—this permission is tied to a Pipeline (Workflow) exclusive feature, not core Jenkins functionality.

The Short Answer

The Run.Replay permission is defined in the org.jenkinsci.plugins.workflow.cps.replay.ReplayAction class, which is part of the Workflow CPS Plugin (the plugin that powers Pipeline functionality in Jenkins).

Breakdown of the Permission Definition

Here’s a simplified snippet of how the permission is declared in that class:

public static final Permission REPLAY = new Permission(
    Run.PERMISSIONS, 
    "Replay", 
    Messages.ReplayAction_PermissionDescription(), 
    Run.UPDATE, 
    PermissionScope.JENKINS
);
  • It’s registered under Run.PERMISSIONS, which is why it shows up alongside core Run permissions (like Delete/UPDATE) in the Jenkins UI.
  • The permission inherits an "implied by" relationship from Run.UPDATE, meaning users with Run.UPDATE access will automatically get Run.Replay permissions unless you explicitly restrict it.

Why It’s Not in Core Run

Replay is a feature unique to Pipeline jobs—it lets you re-run a Pipeline with modified script content without committing changes to your source control. Since this functionality doesn’t apply to all Jenkins job types (like Freestyle jobs), the permission lives in the plugin that provides the feature, not Jenkins core.

内容的提问来源于stack exchange,提问作者agabrys

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 08:12:30