forgejo/services
Gergely Nagy 261fc87673 Allow admins to fork repos even when creation limits are exhausted (#3277)
This is a continuation of #2728, with a test case added.

Fixes #2633.

I kept @zareck 's commit as is, because I believe it is correct. We can't move the check to `owner.CanForkRepo()`, because `owner` is the future owner of the forked repo, and may be an organization. We need to check the admin permission of the `doer`, like in the case of repository creation.

I verified that the test fails without the `ForkRepository` change, and passes with it.

Co-authored-by: Cassio Zareck <cassiomilczareck@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3277
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu>
Co-committed-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit ea4071ca9f)
2024-04-17 06:06:48 +00:00
..
actions Merge pull request '[v1.22/gitea] week 16 cherry pick to v7.0' (#3235) from earl-warren/forgejo:wip-v7.0-gitea-cherry-pick into v7.0/forgejo 2024-04-16 09:31:46 +00:00
agit
asymkey
attachment
auth Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
automerge
context Clean up log messages (#30313) 2024-04-15 16:11:14 +02:00
contexttest add label filters in org/{org_name}/issues 2024-04-04 17:37:56 +00:00
convert Fix missed doer (#30231) (#30343) 2024-04-15 16:21:45 +02:00
cron Update checker setting updates 2024-04-10 20:55:35 +00:00
doctor Merge pull request '[v7.0/forgejo] [BUG] Don't remove builtin OAuth2 applications' (#3069) from bp-v7.0/forgejo-6af8f3a into v7.0/forgejo 2024-04-06 12:43:33 +00:00
externalaccount
feed
forgejo
forms [I18N] Improve English locale 2024-04-15 17:50:01 +00:00
gitdiff
indexer
issue
lfs
mailer
markup [v7.0/forgejo] Render inline file permalinks 2024-04-01 16:15:58 +02:00
migrations Change the default maxPerPage for gitbucket (#30392) (#30425) 2024-04-15 16:41:09 +02:00
mirror Avoid losing token when updating mirror settings (#30429) (#30464) 2024-04-15 16:43:34 +02:00
notify Clean up log messages (#30313) 2024-04-15 16:11:14 +02:00
org
packages
pull Do not update PRs based on events that happened before they existed 2024-04-12 10:41:19 +02:00
release
repository Allow admins to fork repos even when creation limits are exhausted (#3277) 2024-04-17 06:06:48 +00:00
secrets
task
uinotification
user [v7.0/forgejo] Add optional pronoun field in user settings (#3076) 2024-04-06 13:23:43 +00:00
webhook Fix missed doer (#30231) (#30343) 2024-04-15 16:21:45 +02:00
wiki Clean up log messages (#30313) 2024-04-15 16:11:14 +02:00