Property | Type | Description | |
---|---|---|---|
$locationService | eZ\Publish\API\Repository\LocationService | Location service. | |
$roleService | eZ\Publish\API\Repository\RoleService | Role service. | |
$userService | eZ\Publish\API\Repository\UserService | User service. |
Method | Description | |
---|---|---|
__construct ( eZ\Publish\API\Repository\RoleService $roleService, eZ\Publish\API\Repository\UserService $userService, eZ\Publish\API\Repository\LocationService $locationService ) | Construct controller. | |
addPolicy ( $roleId, |
Adds a policy to role. | |
addPolicyByRoleDraft ( $roleId, |
Adds a policy to a role draft. | |
assignRoleToUser ( $userId, |
Assigns role to user. | |
assignRoleToUserGroup ( $groupPath, |
Assigns role to user group. | |
createRole ( |
Create new role. | |
createRoleDraft ( $roleId, |
Creates a new RoleDraft for an existing Role. | |
deletePolicies ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | Deletes all policies from a role. | |
deletePolicy ( $roleId, $policyId, |
Delete a policy from role. | |
deleteRole ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | Delete a role by ID. | |
deleteRoleDraft ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | Delete a role draft by ID. | |
listPoliciesForUser ( |
Search all policies which are applied to a given user. | |
listRoles ( |
Loads list of roles. | |
loadPolicies ( $roleId, |
Loads the policies for the role. | |
loadPolicy ( $roleId, $policyId, |
Loads a policy. | |
loadRole ( $roleId ) : eZ\Publish\API\Repository\Values\User\Role | Loads role. | |
loadRoleAssignmentForUser ( $userId, $roleId, |
Returns a role assignment to the given user. | |
loadRoleAssignmentForUserGroup ( $groupPath, $roleId, |
Returns a role assignment to the given user group. | |
loadRoleAssignmentsForUser ( $userId ) : |
Loads role assignments for user. | |
loadRoleAssignmentsForUserGroup ( $groupPath ) : |
Loads role assignments for user group. | |
loadRoleDraft ( mixed $roleId ) : eZ\Publish\API\Repository\Values\User\RoleDraft | Loads a role draft. | |
publishRoleDraft ( mixed $roleId ) : |
Publishes a role draft. | |
removePolicyByRoleDraft ( $roleId, $policyId, |
Remove a policy from a role draft. | |
unassignRoleFromUser ( $userId, $roleId ) : |
Un-assigns role from user. | |
unassignRoleFromUserGroup ( $groupPath, $roleId ) : |
Un-assigns role from user group. | |
updatePolicy ( $roleId, $policyId, |
Updates a policy. | |
updatePolicyByRoleDraft ( $roleId, $policyId, |
Updates a policy. | |
updateRole ( $roleId, |
Updates a role. | |
updateRoleDraft ( mixed $roleId, |
Updates a role draft. |
Method | Description | |
---|---|---|
mapToUpdateStruct ( eZ\Publish\API\Repository\Values\User\RoleCreateStruct $createStruct ) : eZ\Publish\API\Repository\Values\User\RoleUpdateStruct | Maps a RoleCreateStruct to a RoleUpdateStruct. |
Method | Description | |
---|---|---|
getLastAddedPolicy ( $role ) : eZ\Publish\API\Repository\Values\User\Policy | Get the last added policy for $role. |
public __construct ( eZ\Publish\API\Repository\RoleService $roleService, eZ\Publish\API\Repository\UserService $userService, eZ\Publish\API\Repository\LocationService $locationService ) | ||
$roleService | eZ\Publish\API\Repository\RoleService | |
$userService | eZ\Publish\API\Repository\UserService | |
$locationService | eZ\Publish\API\Repository\LocationService |
public addPolicy ( $roleId, |
||
$roleId | int ID of a role or a role draft | |
$request | ||
return |
public addPolicyByRoleDraft ( $roleId, |
||
$roleId | ||
$request | ||
return |
public assignRoleToUser ( $userId, |
||
$userId | ||
$request | ||
return |
public assignRoleToUserGroup ( $groupPath, |
||
$groupPath | ||
$request | ||
return |
public createRole ( |
||
$request | ||
return |
public createRoleDraft ( $roleId, |
||
$request | ||
return |
public deletePolicies ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | ||
$roleId | ||
return | eZ\Publish\Core\REST\Server\Values\NoContent |
public deletePolicy ( $roleId, $policyId, |
||
$roleId | int ID of a role or a role draft | |
$policyId | int ID of a policy | |
$request | ||
return | eZ\Publish\Core\REST\Server\Values\NoContent |
public deleteRole ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | ||
$roleId | ||
return | eZ\Publish\Core\REST\Server\Values\NoContent |
public deleteRoleDraft ( $roleId ) : eZ\Publish\Core\REST\Server\Values\NoContent | ||
$roleId | ||
return | eZ\Publish\Core\REST\Server\Values\NoContent |
public listPoliciesForUser ( |
||
$request | ||
return |
public listRoles ( |
||
$request | ||
return |
public loadPolicies ( $roleId, |
||
$roleId | ||
$request | ||
return |
public loadPolicy ( $roleId, $policyId, |
||
$roleId | ||
$policyId | ||
$request | ||
return | eZ\Publish\API\Repository\Values\User\Policy |
public loadRole ( $roleId ) : eZ\Publish\API\Repository\Values\User\Role | ||
$roleId | ||
return | eZ\Publish\API\Repository\Values\User\Role |
public loadRoleAssignmentForUser ( $userId, $roleId, |
||
$userId | ||
$roleId | ||
$request | ||
return |
public loadRoleAssignmentForUserGroup ( $groupPath, $roleId, |
||
$groupPath | ||
$roleId | ||
$request | ||
return |
public loadRoleAssignmentsForUser ( $userId ) : |
||
$userId | ||
return |
public loadRoleAssignmentsForUserGroup ( $groupPath ) : |
||
$groupPath | ||
return |
public loadRoleDraft ( mixed $roleId ) : eZ\Publish\API\Repository\Values\User\RoleDraft | ||
$roleId | mixed | Original role ID, or ID of the role draft itself |
return | eZ\Publish\API\Repository\Values\User\RoleDraft |
protected mapToUpdateStruct ( eZ\Publish\API\Repository\Values\User\RoleCreateStruct $createStruct ) : eZ\Publish\API\Repository\Values\User\RoleUpdateStruct | ||
$createStruct | eZ\Publish\API\Repository\Values\User\RoleCreateStruct | |
return | eZ\Publish\API\Repository\Values\User\RoleUpdateStruct |
public publishRoleDraft ( mixed $roleId ) : |
||
$roleId | mixed | Original role ID, or ID of the role draft itself |
return |
public removePolicyByRoleDraft ( $roleId, $policyId, |
||
$roleId | ||
$policyId | ||
$request | ||
return | eZ\Publish\Core\REST\Server\Values\NoContent |
public unassignRoleFromUser ( $userId, $roleId ) : |
||
$userId | ||
$roleId | ||
return |
public unassignRoleFromUserGroup ( $groupPath, $roleId ) : |
||
$groupPath | ||
$roleId | ||
return |
public updatePolicy ( $roleId, $policyId, |
||
$roleId | int ID of a role or a role draft | |
$policyId | int ID of a policy | |
$request | ||
return | eZ\Publish\API\Repository\Values\User\Policy |
public updatePolicyByRoleDraft ( $roleId, $policyId, |
||
$roleId | ||
$policyId | ||
$request | ||
return | eZ\Publish\API\Repository\Values\User\Policy |
public updateRole ( $roleId, |
||
$roleId | ||
$request | ||
return | eZ\Publish\API\Repository\Values\User\Role |
public updateRoleDraft ( mixed $roleId, |
||
$roleId | mixed | Original role ID, or ID of the role draft itself |
$request | ||
return | eZ\Publish\API\Repository\Values\User\RoleDraft |
protected LocationService,eZ\Publish\API\Repository $locationService | ||
return | eZ\Publish\API\Repository\LocationService |
protected RoleService,eZ\Publish\API\Repository $roleService | ||
return | eZ\Publish\API\Repository\RoleService |