diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-05-20 08:56:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 00:56:45 +0000 |
commit | edbf74c418061b013a5855f604dd6be6baf34132 (patch) | |
tree | 0c8fa83ec5f2eec37669d6eb75274a79de8f7e78 /services/migrations/gitea_uploader.go | |
parent | 82a0c36332824b8ab41efdf6503e86170ce92f08 (diff) | |
download | gitea-edbf74c418061b013a5855f604dd6be6baf34132.tar.gz gitea-edbf74c418061b013a5855f604dd6be6baf34132.zip |
Fix "force private" logic (#31012)
When creating a repo, the "FORCE_PRIVATE" config option should be
respected, `readonly` doesn't work for checkbox, so it should use
`disabled` attribute.
Diffstat (limited to 'services/migrations/gitea_uploader.go')
-rw-r--r-- | services/migrations/gitea_uploader.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index c63383f5ca..4c8e036f05 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -107,7 +107,7 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, opts base.Migrate Description: repo.Description, OriginalURL: repo.OriginalURL, GitServiceType: opts.GitServiceType, - IsPrivate: opts.Private, + IsPrivate: opts.Private || setting.Repository.ForcePrivate, IsMirror: opts.Mirror, Status: repo_model.RepositoryBeingMigrated, }) |