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 package module

The policy functions of the package module (9) and their limitations.

Download as PDF

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

On this page

Policies of the package module

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

create

Checked by the views: create.

LimitationValues come from
CreatorTypeeZPackageCreationHandler::creatorLimitationList()
RoleeZPackage::maintainerRoleListForRoles()
TypeeZPackage::typeList()
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'package', 'create', array( 'CreatorType' => array( /* values */ ) ) );
{if fetch( 'user', 'has_access_to', hash( 'module', 'package', 'function', 'create' ) )}
    ...
{/if}

edit

No view of the module names it; code checks it (eZUser::hasAccessTo( 'package', 'edit' ) or the user/has_access_to fetch).

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

export

Checked by the views: export.

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

export_extension

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

import

Checked by the views: upload.

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

install

Checked by the views: install, uninstall.

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

list

Checked by the views: list.

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

read

Checked by the views: compare, view, viewfile.

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

remove

No view of the module names it; code checks it (eZUser::hasAccessTo( 'package', 'remove' ) or the user/has_access_to fetch).

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

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