mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
Allow users with write permission to run actions (#32644)
--- I have a use case where I need a team to be able to run actions without admin access.
This commit is contained in:
@@ -168,8 +168,8 @@ func List(ctx *context.Context) {
|
||||
actionsConfig := ctx.Repo.Repository.MustGetUnit(ctx, unit.TypeActions).ActionsConfig()
|
||||
ctx.Data["ActionsConfig"] = actionsConfig
|
||||
|
||||
if len(workflowID) > 0 && ctx.Repo.IsAdmin() {
|
||||
ctx.Data["AllowDisableOrEnableWorkflow"] = true
|
||||
if len(workflowID) > 0 && ctx.Repo.CanWrite(unit.TypeActions) {
|
||||
ctx.Data["AllowDisableOrEnableWorkflow"] = ctx.Repo.IsAdmin()
|
||||
isWorkflowDisabled := actionsConfig.IsWorkflowDisabled(workflowID)
|
||||
ctx.Data["CurWorkflowDisabled"] = isWorkflowDisabled
|
||||
|
||||
|
Reference in New Issue
Block a user