gpt4 book ai didi

jenkins - hudson.model.Run.Replay 权限对象在哪里定义?

转载 作者:行者123 更新时间:2023-12-05 06:21:39 26 4
gpt4 key购买 nike

Jenkins 允许使用 UI 授予成员(用户和组)Run.Replay(运行 → 重播)权限:

Configure Permissions

不幸的是,Run.Replay 权限未在 hudson.model.Run 类中定义。所有其他权限均可用:

  • 删除Run.DELETE
  • 更新Run.UPDATE

代表Run.Replay权限的hudson.security.Permission对象在哪里定义?

最佳答案

权限由 Pipeline: Groovy 引入插入。它在 org.jenkinsci.plugins.workflow.cps.replay.ReplayAction 类中定义:

/**
* 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);

指向位于 2.78 版本中的类的链接:https://github.com/jenkinsci/workflow-cps-plugin/blob/workflow-cps-2.78/src/main/java/org/jenkinsci/plugins/workflow/cps/replay/ReplayAction.java#L360

关于jenkins - hudson.model.Run.Replay 权限对象在哪里定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59665635/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com