Policies of the apikey module
The policy functions of apikey and their limitations, from $FunctionList in kernel/apikey/module.php. In the administration they are chosen under Roles and policies; a policy on apikey/* grants every function.
create
No view of the module names it; code checks it (eZUser::hasAccessTo( 'apikey', 'create' ) or the user/has_access_to fetch).
| Limitation | Values come from |
|---|---|
| Scope | fixed: Read content (read), Create and publish content (publish), Edit content (edit), Remove content (remove), Read context help (help), Read content through GraphQL (graphql:read), Change content through GraphQL (graphql:write), Read the state of the migrations (migration:read) |
// Give a role the policy (eZRole::appendPolicy( $module, $function, $limitations ))
$role = eZRole::fetchByName( 'Editor' );
$role->appendPolicy( 'apikey', 'create', array( 'Scope' => array( /* values */ ) ) );if fetch( 'user', 'has_access_to', hash( 'module', 'apikey', 'function', 'create' ) )
...
/ifRelated
Generated by ./console exp:help:examples from kernel/apikey/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.