Rename conf option to YAML_SUBMIT_ALLOWED

This commit is contained in:
Jakub Kadlčík
2017-02-19 22:29:19 +01:00
parent 43b653097a
commit 3e2ee93dd8
3 changed files with 6 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ class BaseConfiguration(object):
PDC_INSECURE = True
PDC_DEVELOP = True
SCMURLS = ["git://pkgs.stg.fedoraproject.org/modules/"]
SUBMITTING_YAML = False
YAML_SUBMIT_ALLOWED = False
# How often should we resort to polling, in seconds
# Set to zero to disable polling

View File

@@ -268,6 +268,10 @@ class Config(object):
'type': list,
'default': [],
'desc': 'Allowed SCM URLs.'},
'yaml_submit_allowed': {
'type': bool,
'default': False,
'desc': 'Is it allowed to directly submit modulemd yaml file?'},
'num_consecutive_builds': {
'type': int,
'default': 0,

View File

@@ -98,7 +98,7 @@ class ModuleBuildAPI(MethodView):
raise Unauthorized("%s is not in any of %r, only %r" % (
username, conf.allowed_groups, groups))
if "multipart/form-data" in request.headers.get("Content-Type") and conf.submitting_yaml:
if "multipart/form-data" in request.headers.get("Content-Type") and conf.yaml_submit_allowed:
module = self.post_file(username)
else:
module = self.post_scm(username)