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