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