Commit 5f60e766 authored by Brennen Bearnes's avatar Brennen Bearnes
Browse files

add multi-value settings, handle visibility levels & import sources

Make `apply-settings` send JSON in the request body, which enables us to
set values that take an array.

Use that to handle restricted_visibility_levels and import_sources.

This commit reflects the current state of production settings.

Bug: T284336
parent 5f08662f
......@@ -93,7 +93,7 @@ if confirm('Does the diff look good?'):
local_settings[x] = 'false'
try:
r = requests.put(url, headers=headers, data=local_settings)
r = requests.put(url, headers=headers, json=local_settings)
r.raise_for_status()
new_instance_settings = r.json()
except:
......
......@@ -3,17 +3,11 @@
# True / false values here should be booleans - necessary type juggling to turn
# these into strings for the API is handled in the script.
#
# TODO:
#
# - Enable import from Phabricator: Admin Area, Settings, General, Visibility
# and access controls, Import sources: enable Phabricator
# - import_sources: 'github,bitbucket,bitbucket_server,gitlab,google_code,fogbugz,git,gitlab_project,gitea,manifest,phabricator'
# - Configure visibility levels: "restricted_visibility_levels": [ "private" ]
# Settings not modeled here:
#
# - Accept Let's Encrypt ToS: Admin Area, Settings, Preferences, Pages, I have
# read and agree to the Let's Encrypt Terms of Service: checked
# - Accept Let's Encrypt ToS: Admin Area, Settings, Preferences, Pages, I have
# read and agree to the Let's Encrypt Terms of Service: checked
# Disable public sign up: Admin Area, Settings, General, Sign-up restrictions,
# Sign-up enabled: unchecked
signup_enabled: false
......@@ -97,4 +91,22 @@ gravatar_enabled: false
# experience than being immediately sent to a login form:
home_page_url: "https://gitlab.wikimedia.org/explore"
# Restrict available visibility levels for new projection creation to public:
restricted_visibility_levels:
- internal
- private
# List of accepted import sources: Admin Area, Settings, General, Visibility
# and access controls, Import sources:
import_sources:
- github
- bitbucket
- bitbucket_server
- gitlab
- google_code
- fogbugz
- git
- gitlab_project
- gitea
- manifest
- phabricator
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment