summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-12-20 06:59:56 -0600
committerGitHub <noreply@github.com>2017-12-20 06:59:56 -0600
commit529482135c8e9304dd7cdf08772eaba61d903894 (patch)
treed505021b322cf06ab431fa508036221c4c46b677 /modules
parente67b4055f9087cc381df437502f3cd912abb53ed (diff)
downloadgitea-529482135c8e9304dd7cdf08772eaba61d903894.tar.gz
gitea-529482135c8e9304dd7cdf08772eaba61d903894.zip
Support default private when creating or migrating repository (#3239)
* support default private when creating or migrating repository * fix fmt * use string constants on repository default private in app.ini * fix fmt
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 7d86ef3056..5876662270 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -70,6 +70,13 @@ type MarkupParser struct {
IsInputFile bool
}
+// enumerates all the policy repository creating
+const (
+ RepoCreatingLastUserVisibility = "last"
+ RepoCreatingPrivate = "private"
+ RepoCreatingPublic = "public"
+)
+
// settings
var (
// AppVer settings
@@ -180,6 +187,7 @@ var (
Repository = struct {
AnsiCharset string
ForcePrivate bool
+ DefaultPrivate string
MaxCreationLimit int
MirrorQueueLength int
PullRequestQueueLength int
@@ -209,6 +217,7 @@ var (
}{
AnsiCharset: "",
ForcePrivate: false,
+ DefaultPrivate: RepoCreatingLastUserVisibility,
MaxCreationLimit: -1,
MirrorQueueLength: 1000,
PullRequestQueueLength: 1000,