workflows: don't advertise create formdata action by default (#39640)
This commit is contained in:
parent
a919877d4a
commit
c96714276a
|
@ -5580,6 +5580,12 @@ def test_create_formdata(pub):
|
|||
create_superuser(pub)
|
||||
create_role()
|
||||
|
||||
if not pub.site_options.has_section('options'):
|
||||
pub.site_options.add_section('options')
|
||||
pub.site_options.set('options', 'workflow-create-formdata', 'true')
|
||||
with open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w') as fd:
|
||||
pub.site_options.write(fd)
|
||||
|
||||
FormDef.wipe()
|
||||
target_formdef = FormDef()
|
||||
target_formdef.name = 'target form'
|
||||
|
|
|
@ -179,6 +179,10 @@ class CreateFormdataWorkflowStatusItem(WorkflowStatusItem):
|
|||
mappings = None
|
||||
varname = None
|
||||
|
||||
@classmethod
|
||||
def is_available(cls, workflow=None):
|
||||
return get_publisher().has_site_option('workflow-create-formdata')
|
||||
|
||||
def _resolve_formdef_slug(self, formdef_slug):
|
||||
if formdef_slug:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue