|
|
@@ -45,6 +45,7 @@ class SiteController extends ActionController
|
|
|
private const TEMPLATE_NEWS = "OpenTalent.OtTemplating->news";
|
|
|
private const TEMPLATE_MEMBERS = "OpenTalent.OtTemplating->members";
|
|
|
private const TEMPLATE_MEMBERSCA = "OpenTalent.OtTemplating->membersCa";
|
|
|
+ private const TEMPLATE_STRUCTUREDETAILS = "OpenTalent.OtTemplating->structureDetails";
|
|
|
private const TEMPLATE_LEGAL = "OpenTalent.OtTemplating->legal";
|
|
|
|
|
|
// Pages dokType values
|
|
|
@@ -322,6 +323,15 @@ class SiteController extends ActionController
|
|
|
self::TEMPLATE_MEMBERSCA
|
|
|
);
|
|
|
|
|
|
+ // > 'Présentation > Informations Pratiques' page
|
|
|
+ $this->insertPage(
|
|
|
+ $websiteUid,
|
|
|
+ $this->createdPagesIndex['/presentation'],
|
|
|
+ 'Informations Pratiques',
|
|
|
+ '/informations-pratiques',
|
|
|
+ self::TEMPLATE_STRUCTUREDETAILS
|
|
|
+ );
|
|
|
+
|
|
|
if ($isNetwork) {
|
|
|
// > 'Présentation > Les sociétés adhérentes' page
|
|
|
$this->insertPage(
|
|
|
@@ -594,7 +604,7 @@ class SiteController extends ActionController
|
|
|
->set('TSconfig', $tsconfig)
|
|
|
->execute();
|
|
|
|
|
|
- // Setup user and group rights
|
|
|
+ // Setup users and group rights
|
|
|
$this->setBeUserPerms($organizationId, false, $beGroupUid, $beUserUid);
|
|
|
|
|
|
// Try to commit the result
|
|
|
@@ -714,6 +724,9 @@ class SiteController extends ActionController
|
|
|
->where($queryBuilder->expr()->eq('uid', $website['uid']))
|
|
|
->execute();
|
|
|
|
|
|
+ // Reset the backend users and group permissions
|
|
|
+ $this->setBeUserPerms($organizationId, true);
|
|
|
+
|
|
|
// Try to commit the result
|
|
|
$commitSuccess = $this->connectionPool->getConnectionByName('Default')->commit();
|
|
|
if (!$commitSuccess) {
|
|
|
@@ -1342,6 +1355,7 @@ class SiteController extends ActionController
|
|
|
* - STATUS_EXISTING_DELETED
|
|
|
* - STATUS_EXISTING_HIDDEN
|
|
|
* - STATUS_EXISTING_WITH_WARNINGS
|
|
|
+ * - STATUS_EXISTING_WITH_CRITICAL_ERRORS
|
|
|
*
|
|
|
* @param int $organizationId the organization's id whom site cache should be cleared
|
|
|
* @param bool $fullScan If true, a 'warnings' entry will be added to the result, and a full scan of
|
|
|
@@ -1359,6 +1373,8 @@ class SiteController extends ActionController
|
|
|
$siteInfos = $this->getSiteInfosAction($organizationId);
|
|
|
} catch (NoSuchWebsiteException $e) {
|
|
|
return new SiteStatus($organizationId, SiteStatus::STATUS_NO_SUCH_WEBSITE);
|
|
|
+ } catch(\Throwable $e) {
|
|
|
+ return new SiteStatus($organizationId, SiteStatus::STATUS_EXISTING_WITH_CRITICAL_ERRORS);
|
|
|
}
|
|
|
|
|
|
if ($siteInfos->isDeleted()) {
|
|
|
@@ -2375,9 +2391,9 @@ class SiteController extends ActionController
|
|
|
->orWhere("path LIKE '%form_definitions/" . $organizationId . "/'");
|
|
|
$statement = $queryBuilder->execute();
|
|
|
$rows = $statement->fetchAllAssociative() ?: [];
|
|
|
- $files = [];
|
|
|
+ $fileMounts = [];
|
|
|
foreach ($rows as $row) {
|
|
|
- $files[] = $row['uid'];
|
|
|
+ $fileMounts[] = $row['uid'];
|
|
|
}
|
|
|
|
|
|
$mainGroup = self::IS_PRODUCT_PREMIUM[$userData['product']] ? self::BEGROUP_EDITOR_PREMIUM : self::BEGROUP_EDITOR_STANDARD;
|
|
|
@@ -2388,7 +2404,7 @@ class SiteController extends ActionController
|
|
|
'deleted' => 0,
|
|
|
'subgroup' => $mainGroupUid,
|
|
|
'db_mountpoints' => $rootUid,
|
|
|
- 'file_mountPoints' => implode(',', $files),
|
|
|
+ 'file_mountPoints' => implode(',', $fileMounts),
|
|
|
'file_permissions' => 'readFolder,writeFolder,addFolder,renameFolder,moveFolder,deleteFolder,readFile,writeFile,addFile,renameFile,replaceFile,moveFile,copyFile,deleteFile',
|
|
|
'groupMods' => '', // inherited from the base EditorsGroup
|
|
|
'pagetypes_select' => '', // inherited from the base EditorsGroup
|