Add config option for allowing of direct submitting yaml files to mbs

This commit is contained in:
Jakub Kadlčík
2017-02-17 00:31:09 +01:00
parent 43acbdbdba
commit 43b653097a
2 changed files with 2 additions and 1 deletions

View File

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

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"):
if "multipart/form-data" in request.headers.get("Content-Type") and conf.submitting_yaml:
module = self.post_file(username)
else:
module = self.post_scm(username)