Core/Executor/UserGroupManager.php 1 location
|
@@ 64-68 (lines=5) @@
|
| 61 |
|
if (isset($step->dsl['roles'])) { |
| 62 |
|
$roleService = $this->repository->getRoleService(); |
| 63 |
|
// we support both Ids and Identifiers |
| 64 |
|
foreach ($step->dsl['roles'] as $roleId) { |
| 65 |
|
$roleId = $this->referenceResolver->resolveReference($roleId); |
| 66 |
|
$role = $this->roleMatcher->matchOneByKey($roleId); |
| 67 |
|
$roleService->assignRoleToUserGroup($role, $userGroup); |
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
$this->setReferences($userGroup, $step); |
Core/Executor/UserManager.php 1 location
|
@@ 45-53 (lines=9) @@
|
| 42 |
|
$contentTypeService = $this->repository->getContentTypeService(); |
| 43 |
|
|
| 44 |
|
$userGroups = array(); |
| 45 |
|
foreach ($step->dsl['groups'] as $groupId) { |
| 46 |
|
$groupId = $this->referenceResolver->resolveReference($groupId); |
| 47 |
|
$userGroup = $this->userGroupMatcher->matchOneByKey($groupId); |
| 48 |
|
|
| 49 |
|
// q: in which case can we have no group? And should we throw an exception? |
| 50 |
|
//if ($userGroup) { |
| 51 |
|
$userGroups[] = $userGroup; |
| 52 |
|
//} |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
// FIXME: Hard coding content type to user for now |
| 56 |
|
$userContentType = $contentTypeService->loadContentTypeByIdentifier($this->getUserContentType($step)); |
Core/FieldHandler/EzRelationList.php 1 location
|
@@ 35-40 (lines=6) @@
|
| 32 |
|
$ids = $fieldValue; |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
foreach ($ids as $key => $id) { |
| 36 |
|
// 1. resolve relations |
| 37 |
|
$ids[$key] = $this->referenceResolver->resolveReference($id); |
| 38 |
|
// 2. resolve remote ids |
| 39 |
|
$ids[$key] = $this->contentMatcher->matchOneByKey($ids[$key])->id; |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
return new Value($ids); |
| 43 |
|
} |