Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Policies of the user module

The policy functions of the user module (12) and their limitations.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/policies/user.md

On this page

Policies of the user module

The policy functions of user and their limitations, from $FunctionList in kernel/user/module.php. In the administration they are chosen under Roles and policies; a policy on user/* grants every function.

activation

Checked by the views: unactivated.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'activation' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'activation' ) )}
    ...
{/if}

audit

Checked by the views: audit.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'audit' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'audit' ) )}
    ...
{/if}

deactivate

Checked by the views: deactivate.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'deactivate' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'deactivate' ) )}
    ...
{/if}

hygiene

Checked by the views: hygiene.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'hygiene' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'hygiene' ) )}
    ...
{/if}

login

Checked by the views: activate, edit, login, logout, megamenu, passkeys, preferences, registration, security, sessions.

LimitationValues come from
SiteAccesseZSiteAccess::siteAccessList()
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'login', array( 'SiteAccess' => array( /* values */ ) ) );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'login' ) )}
    ...
{/if}

passkeys_manage

No view of the module names it; code checks it (eZUser::hasAccessTo( 'user', 'passkeys_manage' ) 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( 'user', 'passkeys_manage' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'passkeys_manage' ) )}
    ...
{/if}

password

Checked by the views: forgotpassword, password.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'password' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'password' ) )}
    ...
{/if}

preferences

Checked by the views: setting.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'preferences' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'preferences' ) )}
    ...
{/if}

register

Checked by the views: register, success.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'register' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'register' ) )}
    ...
{/if}

selfedit

No view of the module names it; code checks it (eZUser::hasAccessTo( 'user', 'selfedit' ) 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( 'user', 'selfedit' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'selfedit' ) )}
    ...
{/if}

sessions

No view of the module names it; code checks it (eZUser::hasAccessTo( 'user', 'sessions' ) 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( 'user', 'sessions' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'sessions' ) )}
    ...
{/if}

sessions_manage

Checked by the views: sessionreport.

No limitations: the policy is all or nothing.

// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'user', 'sessions_manage' );
{if fetch( 'user', 'has_access_to', hash( 'module', 'user', 'function', 'sessions_manage' ) )}
    ...
{/if}

Generated by ./console exp:help:examples from kernel/user/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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x