gitea/routers/api/v1/repo
qwerty287 8eb1cd9264
Add "Allow edits from maintainer" feature (#18002)
Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7).
If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option.
Then users with write access to the base branch get more permissions on this branch:
* use the update pull request button
* push directly from the command line (`git push`)
* edit/delete/upload files via web UI
* use related API endpoints

You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions.

This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR.

Closes #17728

Co-authored-by: 6543 <6543@obermui.de>
2022-04-28 17:45:33 +02:00
..
blob.go RepoAssignment ensure to close before overwrite (#19449) 2022-04-21 17:17:57 +02:00
branch.go more context for models (#19511) 2022-04-28 13:48:48 +02:00
collaborators.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
commits.go Pass gitRepo down to GetRawDiff, since its used for main repo and wiki (#19461) 2022-04-25 20:45:18 +02:00
file.go Add "Allow edits from maintainer" feature (#18002) 2022-04-28 17:45:33 +02:00
fork.go Make git.OpenRepository accept Context (#19260) 2022-03-30 03:13:41 +08:00
git_hook.go Move macaron to chi (#14293) 2021-01-26 16:36:53 +01:00
git_ref.go Multiple Escaping Improvements (#17551) 2021-11-16 18:18:25 +00:00
hook.go RepoAssignment ensure to close before overwrite (#19449) 2022-04-21 17:17:57 +02:00
hook_test.go Decouple unit test, remove intermediate `unittestbridge` package (#17662) 2021-11-16 16:53:21 +08:00
issue.go User specific repoID or xorm builder conditions for issue search (#19475) 2022-04-25 16:06:24 +02:00
issue_comment.go more context for models (#19511) 2022-04-28 13:48:48 +02:00
issue_label.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
issue_reaction.go Move reaction to models/issues/ (#19264) 2022-03-31 17:20:39 +08:00
issue_stopwatch.go Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) (#19163) 2022-03-22 16:22:54 +01:00
issue_subscription.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
issue_tracked_time.go Never use /api/v1 from Gitea UI Pages (#19318) 2022-04-07 20:59:56 +02:00
key.go Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) (#19163) 2022-03-22 16:22:54 +01:00
label.go Move init repository related functions to modules (#19159) 2022-03-29 15:23:45 +08:00
language.go Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
main_test.go Use queue instead of memory queue in webhook send service (#19390) 2022-04-25 20:03:01 +02:00
migrate.go Document 409 error returned by repos/migrate api (#19376) 2022-04-12 16:13:07 +08:00
milestone.go Move milestone to models/issues/ (#19278) 2022-04-08 17:11:15 +08:00
mirror.go An attempt to sync a non-mirror repo must give 400 (Bad Request) (#19300) 2022-04-01 14:29:57 -04:00
notes.go RepoAssignment ensure to close before overwrite (#19449) 2022-04-21 17:17:57 +02:00
patch.go Add "Allow edits from maintainer" feature (#18002) 2022-04-28 17:45:33 +02:00
pull.go Add "Allow edits from maintainer" feature (#18002) 2022-04-28 17:45:33 +02:00
pull_review.go more context for models (#19511) 2022-04-28 13:48:48 +02:00
release.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
release_attachment.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
release_tags.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
repo.go more context for models (#19511) 2022-04-28 13:48:48 +02:00
repo_test.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
star.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
status.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
subscriber.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
tag.go Renamed ctx.User to ctx.Doer. (#19161) 2022-03-22 15:03:22 +08:00
teams.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
topic.go Some repository refactors (#17950) 2021-12-12 23:48:20 +08:00
transfer.go Fix logging of Transfer API (#19456) 2022-04-22 00:05:53 +08:00
tree.go Propagate context and ensure git commands run in request context (#17868) 2022-01-19 23:26:57 +00:00
wiki.go Make git.OpenRepository accept Context (#19260) 2022-03-30 03:13:41 +08:00