|
|
@@ -9,7 +9,6 @@ use App\ApiResources\Profile\AccessProfile;
|
|
|
use App\ApiResources\Profile\OrganizationProfile;
|
|
|
use App\Entity\Access\Access;
|
|
|
use App\Entity\Organization\Organization;
|
|
|
-use App\Repository\Organization\OrganizationRepository;
|
|
|
use App\Service\Network\Tree;
|
|
|
use App\Service\Security\Module;
|
|
|
use Symfony\Component\Security\Core\Role\Role;
|
|
|
@@ -80,6 +79,7 @@ final class AccessProfileDataProvider implements ItemDataProviderInterface, Rest
|
|
|
*/
|
|
|
public function setOrganizationProfileFromOrganization(Organization $organization): OrganizationProfile{
|
|
|
$organizationProfile = new OrganizationProfile();
|
|
|
+ $organizationProfile->setId($organization->getId());
|
|
|
$organizationProfile->setName($organization->getName());
|
|
|
$organizationProfile->setModules($this->module->getOrganizationModules($organization));
|
|
|
$organizationProfile->setProduct($organization->getSettings()->getProduct());
|
|
|
@@ -87,6 +87,10 @@ final class AccessProfileDataProvider implements ItemDataProviderInterface, Rest
|
|
|
$organizationProfile->setSubDomain($organization->getParameters()->getSubDomain());
|
|
|
$organizationProfile->setWebsite($organization->getParameters()->getWebsite());
|
|
|
|
|
|
+ foreach ($organization->getNetworkOrganizations() as $networkOrganization){
|
|
|
+ $organizationProfile->addNetwork($networkOrganization->getNetwork()->getName());
|
|
|
+ }
|
|
|
+
|
|
|
/** @var Organization $parent */
|
|
|
foreach ($this->tree->findAllParentsAndSortByType($organization) as $parent){
|
|
|
$parentProfile = new OrganizationProfile();
|