Add config to disable private changes

This commit adds a config option so that we can disable
private changes. With this config enabled, users will not
be able to create private changes through UI or Git push.
Users can't set a change to be private through the
PostPrivate REST endpoint, either.

Bug: Issue 8111
Change-Id: I2794c140f37bd3940b0a2fad68abbced1145c843
This commit is contained in:
Changcheng Xiao
2018-02-05 20:15:42 +00:00
committed by Paladox none
parent 525c98bf3d
commit d802ae4785
11 changed files with 210 additions and 9 deletions

View File

@@ -1222,6 +1222,12 @@ Zero or negative values allow robot comments of unlimited size.
+
The default limit is 1024kB.
[[change.disablePrivateChanges]]change.disablePrivateChanges::
+
If set to true, users are not allowed to create private changes.
+
The default is false.
[[changeCleanup]]
=== Section changeCleanup

View File

@@ -1403,6 +1403,8 @@ interface should poll for updates to the currently open change].
|`submit_whole_topic` ||
link:config-gerrit.html#change.submitWholeTopic[A configuration if
the whole topic is submitted].
|`disable_private_changes` |not set if `false`|
Returns true if private changes are disabled.
|=============================
[[check-account-external-ids-input]]