Fields are configured using the following properties.
default_expr -- Default value expression
The default value for this field at creation time. It is also
used if the attribute is not found on an object when it is
accessed, this can happen on an old instances if its schema is
edited later. In the expression the following namespace is
available:
- datamodel: the datamodel
- field: the current field
- user: the current user
- portal: the portal
- DateTime: a DateTime constructor
- nothing: None
is_indexed -- Indexed in SearchableText
If true the field is indexed in SearchableText. This only has
meaning for String and String List fields.
acl_read_permissions -- ACL: Read permissions
A ';'-separated list of permissions. If not empty, the user must
have at least one of the permissions on the object to have read
access to the field.
acl_read_roles -- ACL: Read roles
A ';'-separated list of roles. If not empty, the user must have
at least one of the roles on the object to have read access to
the field.
When dealing with member directory entries, the user is deemed
to have the role 'Owner' if the entry in question is his.
acl_read_expr -- ACL: Read expression
A TALES expression which returns a boolean describing on what
condition read access to the field is allowed. In the expression
the following namespace is available:
- datamodel: the datamodel
- field: the current field
- user: the current user
- roles: the current user's roles
- context: the context (the container in creation mode) (the
directory for directory entries)
- proxy: the proxy (None in creation mode)
- dir: an alias for the context
- nothing: None
acl_write_permissions -- ACL: Write permissions
acl_write_roles -- ACL: Write roles
acl_write_expr -- ACL: Write expression
Conditions to have write access to the field. See the read
access description above.
read_ignore_storage -- Read: ignore storage
If true, nothing is actually read from the storage (object or
directory entry). The default value or the 'read expression'
will be used.
read_process_expr -- Read: expression
If not empty, the value read from the storage is further
processed through this TALES expression. The expression's return
value is what the rest of CPSSchemas will see. The following
namespace is available:
- value: the value that was really read from the storage
- data: a mapping of the values read from the storage for this entry
- field: the current field
- user: the current user
- portal: the portal
- proxy: the potentially associated proxy
- object: the context object
- DateTime: a DateTime constructor
- nothing: None
- context: deprecated, use the "object" key instead
Note that the context object is the object on which the read is
being done, it is not the proxy (in the case of attribute
storage).
read_process_dependent_fields -- Read: expression dependent fields
If the above expression uses some other fields, they must be
specified here so that the back-end knows what to fetch when a
re-computation is done.
write_ignore_storage -- Write: ignore storage
If true, nothing will actually be written to the storage.
write_process_expr -- Write: expression
If not empty, the written value will be processed though this
TALES expression before being really written to the storage. The
same namespace than for 'read_process_expr is available, except
that 'value' and 'data' refer to the value as seen by the rest
of CPSSchemas before writing.