diff options
author | Xinyu Zhou <i@sourcehut.net> | 2022-12-28 05:21:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 15:21:14 -0600 |
commit | 7cc7db73b922143a1288d26b39eee9e8e59f7106 (patch) | |
tree | da812b01e5953781a820f05edee52c93efef4bec /modules/setting/repository.go | |
parent | 22a6e9759739af05a862fb5098aec0659aed2e84 (diff) | |
download | gitea-7cc7db73b922143a1288d26b39eee9e8e59f7106.tar.gz gitea-7cc7db73b922143a1288d26b39eee9e8e59f7106.zip |
Add option to prohibit fork if user reached maximum limit of repositories (#21848)
If user has reached the maximum limit of repositories:
- Before
- disallow create
- allow fork without limit
- This patch:
- disallow create
- disallow fork
- Add option `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT` (Default **true**) :
enable this allow user fork repositories without maximum number limit
fixed https://github.com/go-gitea/gitea/issues/21847
Signed-off-by: Xinyu Zhou <i@sourcehut.net>
Diffstat (limited to 'modules/setting/repository.go')
-rw-r--r-- | modules/setting/repository.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/repository.go b/modules/setting/repository.go index ea288d2ed2..d78b63a1f3 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -48,6 +48,7 @@ var ( AllowAdoptionOfUnadoptedRepositories bool AllowDeleteOfUnadoptedRepositories bool DisableDownloadSourceArchives bool + AllowForkWithoutMaximumLimit bool // Repository editor settings Editor struct { @@ -160,6 +161,7 @@ var ( DisableMigrations: false, DisableStars: false, DefaultBranch: "main", + AllowForkWithoutMaximumLimit: true, // Repository editor settings Editor: struct { |