mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-03 10:48:03 +08:00
Rename conf option to YAML_SUBMIT_ALLOWED
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user