From 43b653097abd7d9167f53da4d7c4ccee946b8b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kadl=C4=8D=C3=ADk?= Date: Fri, 17 Feb 2017 00:31:09 +0100 Subject: [PATCH] Add config option for allowing of direct submitting yaml files to mbs --- conf/config.py | 1 + module_build_service/views.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/config.py b/conf/config.py index a4c691ef..b8ff8a5a 100644 --- a/conf/config.py +++ b/conf/config.py @@ -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 diff --git a/module_build_service/views.py b/module_build_service/views.py index 8847404f..372dc8a3 100644 --- a/module_build_service/views.py +++ b/module_build_service/views.py @@ -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)