未验证 提交 baa7ae4d 编写于 作者: R rick

Fix that devops admin users cannot approve a Pipeline input

Signed-off-by: Nrick <1450685+LinuxSuRen@users.noreply.github.com>
上级 84d28f31
......@@ -209,4 +209,6 @@ const (
VerbGet = "get"
// VerbWatch represents the verb of watching a resource
VerbWatch = "watch"
// VerbDelete represents the verb of deleting a resource
VerbDelete = "delete"
)
......@@ -307,8 +307,9 @@ func (h *ProjectPipelineHandler) approvableCheck(nodes []clientDevOps.NodesDetai
if userInfo, ok = request.UserFrom(pipe.Context); ok {
createAuth := authorizer.AttributesRecord{
User: userInfo,
Verb: authorizer.VerbCreate,
Verb: authorizer.VerbDelete,
Workspace: pipe.Workspace,
DevOps: pipe.ProjectName,
Resource: "devopsprojects",
ResourceRequest: true,
ResourceScope: request.DevOpsScope,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册