Policies of the moderation module
The policy functions of moderation and their limitations, from $FunctionList in kernel/moderation/module.php. In the administration they are chosen under Roles and policies; a policy on moderation/* grants every function.
act
Checked by the views: action, report.
No limitations: the policy is all or nothing.
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'moderation', 'act' );if fetch( 'user', 'has_access_to', hash( 'module', 'moderation', 'function', 'act' ) )
...
/ifpersonaldata
No view of the module names it; code checks it (eZUser::hasAccessTo( 'moderation', 'personaldata' ) or the user/has_access_to fetch).
No limitations: the policy is all or nothing.
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'moderation', 'personaldata' );if fetch( 'user', 'has_access_to', hash( 'module', 'moderation', 'function', 'personaldata' ) )
...
/ifread
Checked by the views: recent.
No limitations: the policy is all or nothing.
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'moderation', 'read' );if fetch( 'user', 'has_access_to', hash( 'module', 'moderation', 'function', 'read' ) )
...
/ifRelated
Generated by ./console exp:help:examples from kernel/moderation/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.