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.
| Limitation | Values come from |
|---|---|
| CreatorType | eZPackageCreationHandler::creatorLimitationList() |
| Role | eZPackage::maintainerRoleListForRoles() |
| Type | eZPackage::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' ) )
...
/ifedit
No view of the module names it; code checks it (eZUser::hasAccessTo( 'package', 'edit' ) or the user/has_access_to fetch).
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifexport
Checked by the views: export.
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifexport_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' ) )
...
/ifimport
Checked by the views: upload.
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifinstall
Checked by the views: install, uninstall.
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/iflist
Checked by the views: list.
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifread
Checked by the views: compare, view, viewfile.
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifremove
No view of the module names it; code checks it (eZUser::hasAccessTo( 'package', 'remove' ) or the user/has_access_to fetch).
| Limitation | Values come from |
|---|---|
| Type | eZPackage::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' ) )
...
/ifRelated
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.