mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-14 00:40:02 +08:00
Add config option for allowing of direct submitting yaml files to mbs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user