private function findProfile(Context
$context, string
$profileId): ImportExportProfileEntity
{ $profile =
$this->profileRepository
->
search(new Criteria([$profileId]),
$context) ->
getEntities() ->
get($profileId);
if ($profile instanceof ImportExportProfileEntity
) { return $profile;
} throw new ProfileNotFoundException($profileId);
} private function checkAllowedReadPrivileges(ImportExportProfileEntity
$profile, Context
$context): void
{ $missingPrivileges =
[];
$sourceEntity =
$profile->
getSourceEntity();
$privilege =
sprintf('%s:%s',
$sourceEntity, AclRoleDefinition::PRIVILEGE_READ
);
if (!
$context->
isAllowed($privilege)) { $missingPrivileges[] =
$privilege;
}