|
@@ 523-537 (lines=15) @@
|
| 520 |
|
* @param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup |
| 521 |
|
* @param \eZ\Publish\API\Repository\Values\User\Limitation\RoleLimitation $roleLimitation an optional role limitation (which is either a subtree limitation or section limitation) |
| 522 |
|
*/ |
| 523 |
|
public function assignRoleToUserGroup(Role $role, UserGroup $userGroup, RoleLimitation $roleLimitation = null) |
| 524 |
|
{ |
| 525 |
|
$returnValue = $this->service->assignRoleToUserGroup($role, $userGroup, $roleLimitation); |
| 526 |
|
$this->signalDispatcher->emit( |
| 527 |
|
new AssignRoleToUserGroupSignal( |
| 528 |
|
array( |
| 529 |
|
'roleId' => $role->id, |
| 530 |
|
'userGroupId' => $userGroup->id, |
| 531 |
|
'roleLimitation' => $roleLimitation, |
| 532 |
|
) |
| 533 |
|
) |
| 534 |
|
); |
| 535 |
|
|
| 536 |
|
return $returnValue; |
| 537 |
|
} |
| 538 |
|
|
| 539 |
|
/** |
| 540 |
|
* removes a role from the given user group. |
|
@@ 573-587 (lines=15) @@
|
| 570 |
|
* @param \eZ\Publish\API\Repository\Values\User\User $user |
| 571 |
|
* @param \eZ\Publish\API\Repository\Values\User\Limitation\RoleLimitation $roleLimitation an optional role limitation (which is either a subtree limitation or section limitation) |
| 572 |
|
*/ |
| 573 |
|
public function assignRoleToUser(Role $role, User $user, RoleLimitation $roleLimitation = null) |
| 574 |
|
{ |
| 575 |
|
$returnValue = $this->service->assignRoleToUser($role, $user, $roleLimitation); |
| 576 |
|
$this->signalDispatcher->emit( |
| 577 |
|
new AssignRoleToUserSignal( |
| 578 |
|
array( |
| 579 |
|
'roleId' => $role->id, |
| 580 |
|
'userId' => $user->id, |
| 581 |
|
'roleLimitation' => $roleLimitation, |
| 582 |
|
) |
| 583 |
|
) |
| 584 |
|
); |
| 585 |
|
|
| 586 |
|
return $returnValue; |
| 587 |
|
} |
| 588 |
|
|
| 589 |
|
/** |
| 590 |
|
* removes a role from the given user. |