forgejo/routers
Stefan f3882d4553 fix: allow user with actions write permission to run a workflow from the web UI (#7245)
Users with permissions actions write can reschedule a workflow or start a new one over the API. But if the user try to use workflow dispatch on the web GUI it fails with 404 error.

Debug log says
```
router: completed POST /<owner>/<repo>/actions/manual for <client ip>, 404 Not Found in 21.6ms @ context/permission.go:17(web.registerRoutes.RequireRepoAdmin)
```

I think this is not correct, users with permissons action write should also be able to run a new workflow over the GUI. This can be fixed with this little change.

## Testing

- Create a repository in an organization with [a manual workflow](https://forgejo.org/docs/next/user/actions/#onworkflow_dispatch)
- Create a user and assign it action write permissions for this repository in a team
- Login as the user and verify they are allowed to run the workflow via the web UI

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7245): <!--number 7245 --><!--line 0 --><!--description YWxsb3cgdXNlciB3aXRoIGFjdGlvbnMgd3JpdGUgcGVybWlzc2lvbiB0byBydW4gYSB3b3JrZmxvdyBmcm9tIHRoZSB3ZWIgVUk=-->allow user with actions write permission to run a workflow from the web UI<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7245
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Stefan <stku@noreply.codeberg.org>
Co-committed-by: Stefan <stku@noreply.codeberg.org>
2025-04-18 19:17:03 +00:00
..
api fix: grammar in a release API error message (#7565) 2025-04-18 07:04:40 +00:00
common feat: use XORM EngineGroup instead of single Engine connection (#7212) 2025-03-30 11:34:02 +00:00
install chore: use sharp to generate images (#7512) 2025-04-11 15:12:50 +00:00
private Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web fix: allow user with actions write permission to run a workflow from the web UI (#7245) 2025-04-18 19:17:03 +00:00
init.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00