Validation and context

Registered by Mirco Angelini

the context of the conditions should be the one where the tours will run.
e.g. in 01_basic_add_and_publish_a_folder.cfg:

[amberjack]
steps =
    0_create-a-new-folder
    1_fill-out-the-fields
    2_publish-the-folder
    3_all-done
title = Add and publish a folder
validators =
    python: isNotCreated(context,'/myfolder')
    python: hasRole(context,request, 'Contributor')
    python: hasRole(context,request, 'Reviewer')

[0_create-a-new-folder]
blueprint = collective.amberjack.blueprints.step
text =
title = Create a new folder
url = /
microsteps =
   ...

you should:
1. get the first step's url (in this case '/')
2. apply it to the sandbox (so '/' or '/Members/john-smith/')
3. use it as context for the validators

Blueprint information

Status:
Complete
Approver:
massimo
Priority:
Medium
Drafter:
massimo
Direction:
Approved
Assignee:
massimo
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 1.1
Started by
massimo
Completed by
massimo

Related branches

Sprints

Whiteboard

we could add more tests

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.