Policies of the section module
The policy functions of section and their limitations, from $FunctionList in kernel/section/module.php. In the administration they are chosen under Roles and policies; a policy on section/* grants every function.
assign
Checked by the views: assign, list, view.
| Limitation | Values come from |
|---|---|
| Class | eZContentClass::fetchList() |
| NewSection | eZSection::fetchList() |
| Owner | fixed: Self (1) |
| Section | eZSection::fetchList() |
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'section', 'assign', array( 'Class' => array( /* values */ ) ) );if fetch( 'user', 'has_access_to', hash( 'module', 'section', 'function', 'assign' ) )
...
/ifedit
Checked by the views: edit, list.
No limitations: the policy is all or nothing.
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'section', 'edit' );if fetch( 'user', 'has_access_to', hash( 'module', 'section', 'function', 'edit' ) )
...
/ifview
Checked by the views: list, view.
No limitations: the policy is all or nothing.
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'section', 'view' );if fetch( 'user', 'has_access_to', hash( 'module', 'section', 'function', 'view' ) )
...
/ifRelated
Generated by ./console exp:help:examples from kernel/section/module.php, kernel/classes/ezrole.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.