File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ func List(ctx *context.Context) {
168168 actionsConfig := ctx .Repo .Repository .MustGetUnit (ctx , unit .TypeActions ).ActionsConfig ()
169169 ctx .Data ["ActionsConfig" ] = actionsConfig
170170
171- if len (workflowID ) > 0 && ctx .Repo .IsAdmin ( ) {
171+ if len (workflowID ) > 0 && ctx .Repo .CanWrite ( unit . TypeActions ) {
172172 ctx .Data ["AllowDisableOrEnableWorkflow" ] = true
173173 isWorkflowDisabled := actionsConfig .IsWorkflowDisabled (workflowID )
174174 ctx .Data ["CurWorkflowDisabled" ] = isWorkflowDisabled
Original file line number Diff line number Diff line change @@ -1405,7 +1405,7 @@ func registerRoutes(m *web.Router) {
14051405 m .Get ("" , actions .List )
14061406 m .Post ("/disable" , reqRepoAdmin , actions .DisableWorkflowFile )
14071407 m .Post ("/enable" , reqRepoAdmin , actions .EnableWorkflowFile )
1408- m .Post ("/run" , reqRepoAdmin , actions .Run )
1408+ m .Post ("/run" , reqRepoActionsWriter , actions .Run )
14091409
14101410 m .Group ("/runs/{run}" , func () {
14111411 m .Combo ("" ).
You can’t perform that action at this time.
0 commit comments