diff --git a/.env b/.env index 78c4c348db..fb5d8b4979 100644 --- a/.env +++ b/.env @@ -148,6 +148,7 @@ PHRASEA_NETWORK_NAME=ps_internal PHRASEA_DOMAIN=phrasea.local PHRASEA_GATEWAY_IP=172.30.0.1 +PHRASEA_COMPOSE_PROJECT_NAME=ps # --- Phraseanet container entrypoint settings ------------------------------------------------------------------------- @@ -341,6 +342,7 @@ DB_BACKUP_INIT_RESTORE_LATEST=0 # Every day at 03:00 # @run #DB_BACKUP_CRON_TIME=0 3 * * +DB_BACKUP_CRON_TIME= # Make it small # @run diff --git a/Phraseanet-production-client/README.md b/Phraseanet-production-client/README.md index 3a10463f15..f10366521e 100644 --- a/Phraseanet-production-client/README.md +++ b/Phraseanet-production-client/README.md @@ -23,11 +23,11 @@ Node `^5.0.0`. - Go to Phraseanet-production-client folder ```cd Phraseanet-production-client``` - Generate dist ```npm run dist``` - Go back to Phraseanet folder : ```cd ..``` - - Copy assets in www/assets folder ```make install_asset``` + - Copy assets in www/assets folder ```make install_assets``` - ... or simply one cmd : ```cd Phraseanet-production-client && npm run dist && cd .. && make install_assets && rm -rf cache/*``` ### Push - - If features is finished ```dist``` folder is to be commited with sources. + - If features is finished ```dist``` folder is to be committed with sources. ## Available commands diff --git a/Phraseanet-production-client/config/config.js b/Phraseanet-production-client/config/config.js index f55efc74bf..1b0f517d3f 100644 --- a/Phraseanet-production-client/config/config.js +++ b/Phraseanet-production-client/config/config.js @@ -13,5 +13,5 @@ module.exports = { setupDir: _root + 'tests/setup/node.js', karmaConf: _root + 'config/karma.conf.js', // change this version when you change JS file for lazy loading - assetFileVersion: 85 + assetFileVersion: 86 }; diff --git a/Phraseanet-production-client/dist/authenticate.js b/Phraseanet-production-client/dist/authenticate.js index 4b111738fd..e01363c207 100644 --- a/Phraseanet-production-client/dist/authenticate.js +++ b/Phraseanet-production-client/dist/authenticate.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=85"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=86"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/authenticate.min.js b/Phraseanet-production-client/dist/authenticate.min.js index a3019d47bc..d931e7fa46 100644 --- a/Phraseanet-production-client/dist/authenticate.min.js +++ b/Phraseanet-production-client/dist/authenticate.min.js @@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=85"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=86"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.js b/Phraseanet-production-client/dist/commons.js index d472bf1db5..b87597df2a 100644 --- a/Phraseanet-production-client/dist/commons.js +++ b/Phraseanet-production-client/dist/commons.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=85"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=86"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/commons.min.js b/Phraseanet-production-client/dist/commons.min.js index d053e3089d..fadd8fc4a7 100644 --- a/Phraseanet-production-client/dist/commons.min.js +++ b/Phraseanet-production-client/dist/commons.min.js @@ -91,7 +91,7 @@ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } -/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=85"; +/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=86"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js index 8a64f418a6..7e14af3fdd 100644 --- a/Phraseanet-production-client/dist/production.js +++ b/Phraseanet-production-client/dist/production.js @@ -9901,8 +9901,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var _jquery = __webpack_require__(0); var _jquery2 = _interopRequireDefault(_jquery); @@ -10936,17 +10934,18 @@ var workzone = function workzone(services) { var publicationId = (0, _jquery2.default)(this).attr('data-publication-id'); var exposeName = (0, _jquery2.default)('#expose_list').val(); var assetsContainer = (0, _jquery2.default)(this).parents('.expose_item_deployed'); - var positions = []; + var order = []; (0, _jquery2.default)('.assets_list .chim-wrapper').each(function (i, el) { - positions[(0, _jquery2.default)(this).attr('data-pub-asset-id')] = i + 1; + order.push((0, _jquery2.default)(this).attr('data-pub-asset-id')); }); _jquery2.default.ajax({ type: 'POST', url: '/prod/expose/publication/update-assets-order/?exposeName=' + exposeName, data: { - listPositions: JSON.stringify(_extends({}, positions)) + order: order, + publicationId: publicationId }, dataType: 'json', success: function success(data) { diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js index 8a64f418a6..7e14af3fdd 100644 --- a/Phraseanet-production-client/dist/production.min.js +++ b/Phraseanet-production-client/dist/production.min.js @@ -9901,8 +9901,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var _jquery = __webpack_require__(0); var _jquery2 = _interopRequireDefault(_jquery); @@ -10936,17 +10934,18 @@ var workzone = function workzone(services) { var publicationId = (0, _jquery2.default)(this).attr('data-publication-id'); var exposeName = (0, _jquery2.default)('#expose_list').val(); var assetsContainer = (0, _jquery2.default)(this).parents('.expose_item_deployed'); - var positions = []; + var order = []; (0, _jquery2.default)('.assets_list .chim-wrapper').each(function (i, el) { - positions[(0, _jquery2.default)(this).attr('data-pub-asset-id')] = i + 1; + order.push((0, _jquery2.default)(this).attr('data-pub-asset-id')); }); _jquery2.default.ajax({ type: 'POST', url: '/prod/expose/publication/update-assets-order/?exposeName=' + exposeName, data: { - listPositions: JSON.stringify(_extends({}, positions)) + order: order, + publicationId: publicationId }, dataType: 'json', success: function success(data) { diff --git a/Phraseanet-production-client/src/components/ui/workzone/index.js b/Phraseanet-production-client/src/components/ui/workzone/index.js index 3cb217fb4f..d9d5aeb32a 100644 --- a/Phraseanet-production-client/src/components/ui/workzone/index.js +++ b/Phraseanet-production-client/src/components/ui/workzone/index.js @@ -1014,17 +1014,18 @@ const workzone = (services) => { let publicationId = $(this).attr('data-publication-id'); let exposeName = $('#expose_list').val(); let assetsContainer = $(this).parents('.expose_item_deployed'); - let positions = []; + const order = []; $('.assets_list .chim-wrapper').each(function(i, el){ - positions[$(this).attr('data-pub-asset-id')] = i + 1; + order.push($(this).attr('data-pub-asset-id')); }); $.ajax({ type: 'POST', url: `/prod/expose/publication/update-assets-order/?exposeName=${exposeName}`, data: { - listPositions: JSON.stringify({ ...positions }) + order, + publicationId, }, dataType: 'json', success: function (data) { diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4c0e0290b6..629c4cb8f7 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -5,8 +5,11 @@ services: - ../:/var/alchemy - .:/var/alchemy/Phraseanet - ./docker/nginx/root/entrypoint.sh:/entrypoint.sh - networks: - - internal + gateway-traefik: + volumes: + - ../:/var/alchemy + - .:/var/alchemy/Phraseanet + - ./docker/nginx/root/entrypoint.sh:/entrypoint.sh builder: build: context: . diff --git a/docker-compose.under-phrasea.yml b/docker-compose.under-phrasea.yml index e48be6dd1f..b14932a935 100644 --- a/docker-compose.under-phrasea.yml +++ b/docker-compose.under-phrasea.yml @@ -2,8 +2,8 @@ version: "3.9" networks: phrasea: - external: - name: ${PHRASEA_NETWORK_NAME} + name: ${PHRASEA_NETWORK_NAME} + external: true services: gateway-traefik: @@ -15,7 +15,8 @@ services: - "traefik.docker.network=${PHRASEA_NETWORK_NAME}" - "traefik.http.routers.phraseanet.rule=Host(`${PHRASEANET_HOSTNAME}`)" - "traefik.http.routers.phraseanet.tls=true" - + - "traefik.project_name=${PHRASEA_COMPOSE_PROJECT_NAME}" + phraseanet: extra_hosts: - api-auth.${PHRASEA_DOMAIN}:${PHRASEA_GATEWAY_IP} diff --git a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php index 6791044498..d09c71104a 100644 --- a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php +++ b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php @@ -173,7 +173,8 @@ class PSExposeController extends Controller */ public function listPublicationAction(PhraseaApplication $app, Request $request) { - if ($request->get('exposeName') == null) { + $exposeName = $request->get('exposeName'); + if ($exposeName == null) { return $app->json([ 'twig' => $this->render("prod/WorkZone/ExposeList.html.twig", [ 'publications' => [], @@ -182,10 +183,10 @@ class PSExposeController extends Controller } $exposeConfiguration = $app['conf']->get(['phraseanet-service', 'expose-service', 'exposes'], []); - $exposeConfiguration = $exposeConfiguration[$request->get('exposeName')]; + $exposeConfiguration = $exposeConfiguration[$exposeName]; $session = $this->getSession(); - $passSessionName = $this->getPassSessionName($request->get('exposeName')); + $passSessionName = $this->getPassSessionName($exposeName); $providerId = $session->get('auth_provider.id'); if (!$session->has($passSessionName) && $providerId != null) { @@ -193,7 +194,7 @@ class PSExposeController extends Controller $provider = $this->getAuthenticationProviders()->get($providerId); if ($provider->getType() == 'PsAuth') { $session->set($passSessionName, $provider->getAccessToken()); - $session->set($this->getLoginSessionName($request->get('exposeName')), $provider->getUserName()); + $session->set($this->getLoginSessionName($exposeName), $provider->getUserName()); } } catch(\Exception $e) { } @@ -202,12 +203,12 @@ class PSExposeController extends Controller if (!$session->has($passSessionName) && $exposeConfiguration['connection_kind'] == 'password' && $request->get('format') != 'json') { return $app->json([ 'twig' => $this->render("prod/WorkZone/ExposeOauthLogin.html.twig", [ - 'exposeName' => $request->get('exposeName') + 'exposeName' => $exposeName ]) ]); } - $accessToken = $this->getAndSaveToken($request->get('exposeName')); + $accessToken = $this->getAndSaveToken($exposeName); if ($exposeConfiguration == null ) { return $app->json([ @@ -228,7 +229,7 @@ class PSExposeController extends Controller try { $uri = '/publications?flatten=true&order[createdAt]=desc'; - if ($request->get('mine')) { + if ($request->get('mine') && $exposeConfiguration['connection_kind'] === 'password') { $uri .= '&mine=true'; } @@ -285,8 +286,8 @@ class PSExposeController extends Controller return $app->json([ 'twig' => $exposeListTwig, - 'exposeName' => $request->get('exposeName'), - 'exposeLogin' => $session->get($this->getLoginSessionName($request->get('exposeName'))), + 'exposeName' => $exposeName, + 'exposeLogin' => $session->get($this->getLoginSessionName($exposeName)), 'basePath' => $basePath ]); } @@ -449,9 +450,11 @@ class PSExposeController extends Controller */ public function getPublicationAssetsAction(PhraseaApplication $app, Request $request) { + $exposeName = $request->get('exposeName'); + $config = $this->getExposeConfiguration($exposeName); $page = $request->get('page')?:1; - $exposeClient = $this->getExposeClient($request->get('exposeName')); + $exposeClient = $this->getExposeClient($exposeName); if ($exposeClient == null) { return $app->json([ @@ -460,7 +463,7 @@ class PSExposeController extends Controller ]); } - $accessToken = $this->getAndSaveToken($request->get('exposeName')); + $accessToken = $this->getAndSaveToken($exposeName); try { $resPublication = $exposeClient->get('/publications/' . $request->get('publicationId') . '/assets?page=' . $page , [ @@ -483,16 +486,24 @@ class PSExposeController extends Controller ]); } - $pubAssets = []; + $assets = []; $totalItems = 0; if ($resPublication->getStatusCode() == 200) { $body = json_decode($resPublication->getBody()->getContents(),true); - $pubAssets = $body['hydra:member']; + $assets = $body['hydra:member']; + + if (!empty($assets) && isset($assets[0]['asset'])) { + // expose v1 BC: flatten assets + $assets = array_map(function (array $pubAsset): array { + return $pubAsset['asset']; + }, $assets); + } + $totalItems = $body['hydra:totalItems']; } - return $this->render("prod/WorkZone/ExposePublicationAssets.html.twig", [ - 'pubAssets' => $pubAssets, + return $this->render('prod/WorkZone/ExposePublicationAssets.html.twig', [ + 'assets' => $assets, 'publicationId' => $request->get('publicationId'), 'capabilitiesDelete' => $request->get('capabilitiesDelete'), 'capabilitiesEdit' => $request->get('capabilitiesEdit'), @@ -684,7 +695,7 @@ class PSExposeController extends Controller /** * Update assets positions - * Require params "exposeName" and "listPositions" of the assets + * Require params "exposeName", "publicationId" and "order" of the assets * * @param PhraseaApplication $app * @param Request $request @@ -705,10 +716,15 @@ class PSExposeController extends Controller try { $accessToken = $this->getAndSaveToken($exposeName); - $listPositions = json_decode($request->get('listPositions'), true); - foreach ($listPositions as $pubAssetId => $pos) { - $this->putPublicationAsset($exposeClient, $pubAssetId, $accessToken, ['position' => $pos]); - } + $exposeClient->post(sprintf('/publications/%s/sort-assets', $request->get('publicationId', [])), [ + 'headers' => [ + 'Authorization' => 'Bearer '. $accessToken, + 'Content-Type' => 'application/json' + ], + 'json' => [ + 'order' => $request->get('order', []), + ], + ]); } catch (\Exception $e) { return $app->json([ 'success' => false, @@ -1253,20 +1269,18 @@ class PSExposeController extends Controller } else { $proxyConfig = new NetworkProxiesConfiguration($this->app['conf']); - $oauthClient = $proxyConfig->getClientWithOptions([]); + $oauthClient = $proxyConfig->getClientWithOptions([ + 'verify' => $config['verify_ssl'], + ]); - try { - $response = $oauthClient->post($config['expose_base_uri'] . '/oauth/v2/token', [ - 'json' => [ - 'client_id' => $config['expose_client_id'], - 'client_secret' => $config['expose_client_secret'], - 'grant_type' => 'client_credentials', - 'scope' => 'publish' - ] - ]); - } catch(\Exception $e) { - return null; - } + $response = $oauthClient->post($config['expose_base_uri'] . '/oauth/v2/token', [ + 'json' => [ + 'client_id' => $config['expose_client_id'], + 'client_secret' => $config['expose_client_secret'], + 'grant_type' => 'client_credentials', + 'scope' => 'publish' + ] + ]); if ($response->getStatusCode() !== 200) { return null; @@ -1307,17 +1321,6 @@ class PSExposeController extends Controller ]); } - private function putPublicationAsset(Client $exposeClient, $publicationAssetId, $token, $publicationAssetData) - { - return $exposeClient->put('/publication-assets/' . $publicationAssetId, [ - 'headers' => [ - 'Authorization' => 'Bearer '. $token, - 'Content-Type' => 'application/json' - ], - 'json' => $publicationAssetData - ]); - } - private function removePublication(Client $exposeClient, $publicationId, $token) { return $exposeClient->delete('/publications/' . $publicationId, [ diff --git a/lib/Alchemy/Phrasea/PhraseanetService/Form/PSExposeConfigurationType.php b/lib/Alchemy/Phrasea/PhraseanetService/Form/PSExposeConfigurationType.php index 8e5271c4f5..bab8119bec 100644 --- a/lib/Alchemy/Phrasea/PhraseanetService/Form/PSExposeConfigurationType.php +++ b/lib/Alchemy/Phrasea/PhraseanetService/Form/PSExposeConfigurationType.php @@ -67,7 +67,7 @@ class PSExposeConfigurationType extends AbstractType implements DataMapperInterf * exposes: * expose_test: * activate_expose: true - * connection_kind: account + * connection_kind: password * expose_front_uri: 'localhost:8080' * expose_base_uri: 'localhost:8082' * client_secret: secret diff --git a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php index 2361535753..c0c45e644b 100644 --- a/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php +++ b/lib/Alchemy/Phrasea/Twig/PhraseanetExtension.php @@ -60,7 +60,7 @@ class PhraseanetExtension extends \Twig_Extension { return [ // change this version when you change JS file to force the navigation to reload js file - 'assetFileVersion' => 85 + 'assetFileVersion' => 86 ]; } diff --git a/resources/proxies/__CG__AlchemyPhraseaModelEntitiesUser.php b/resources/proxies/__CG__AlchemyPhraseaModelEntitiesUser.php index 269fd183bc..ce5074dee7 100644 --- a/resources/proxies/__CG__AlchemyPhraseaModelEntitiesUser.php +++ b/resources/proxies/__CG__AlchemyPhraseaModelEntitiesUser.php @@ -64,10 +64,10 @@ class User extends \Alchemy\Phrasea\Model\Entities\User implements \Doctrine\ORM public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'login', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'email', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'password', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nonce', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'saltedPassword', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'firstName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'gender', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'address', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'city', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'country', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'zipCode', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'geonameId', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'locale', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'timezone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'job', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'activity', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'company', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'phone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'fax', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'admin', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'guest', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'requestNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ldapCreated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastAppliedTemplate', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'pushList', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeFtpProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastConnection', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailLocked', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'deleted', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'updated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'templateOwner', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ftpCredential', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'queries', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'settings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'notificationSettings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'grantedApi']; + return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'login', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'email', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'password', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nonce', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'saltedPassword', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'firstName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'gender', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'address', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'city', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'country', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'zipCode', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'geonameId', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'locale', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'timezone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'job', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'activity', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'company', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'phone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'fax', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'admin', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'guest', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'requestNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ldapCreated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastAppliedTemplate', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'pushList', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeFtpProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastConnection', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailLocked', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'deleted', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'updated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'templateOwner', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ftpCredential', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'queries', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'settings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'notificationSettings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'grantedApi', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nbInactivityEmail', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastInactivityEmail']; } - return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'login', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'email', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'password', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nonce', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'saltedPassword', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'firstName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'gender', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'address', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'city', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'country', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'zipCode', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'geonameId', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'locale', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'timezone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'job', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'activity', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'company', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'phone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'fax', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'admin', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'guest', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'requestNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ldapCreated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastAppliedTemplate', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'pushList', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeFtpProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastConnection', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailLocked', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'deleted', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'updated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'templateOwner', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ftpCredential', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'queries', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'settings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'notificationSettings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'grantedApi']; + return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'login', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'email', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'password', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nonce', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'saltedPassword', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'firstName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastName', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'gender', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'address', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'city', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'country', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'zipCode', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'geonameId', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'locale', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'timezone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'job', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'activity', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'company', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'phone', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'fax', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'admin', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'guest', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'requestNotificationsActivated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ldapCreated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastAppliedTemplate', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'pushList', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'canChangeFtpProfil', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastConnection', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'mailLocked', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'deleted', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'updated', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'templateOwner', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'ftpCredential', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'queries', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'settings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'notificationSettings', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'grantedApi', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'nbInactivityEmail', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\User' . "\0" . 'lastInactivityEmail']; } /** @@ -1068,6 +1068,50 @@ class User extends \Alchemy\Phrasea\Model\Entities\User implements \Doctrine\ORM return parent::setGrantedApi($grantedApi); } + /** + * {@inheritDoc} + */ + public function setNbInactivityEmail($nbEnactivityEmail) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setNbInactivityEmail', [$nbEnactivityEmail]); + + return parent::setNbInactivityEmail($nbEnactivityEmail); + } + + /** + * {@inheritDoc} + */ + public function getNbInactivityEmail() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getNbInactivityEmail', []); + + return parent::getNbInactivityEmail(); + } + + /** + * {@inheritDoc} + */ + public function setLastInactivityEmail($lastInactivityEmail) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLastInactivityEmail', [$lastInactivityEmail]); + + return parent::setLastInactivityEmail($lastInactivityEmail); + } + + /** + * {@inheritDoc} + */ + public function getLastInactivityEmail() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLastInactivityEmail', []); + + return parent::getLastInactivityEmail(); + } + /** * {@inheritDoc} */ diff --git a/templates/web/prod/WorkZone/ExposePublicationAssets.html.twig b/templates/web/prod/WorkZone/ExposePublicationAssets.html.twig index 6e097ed4f5..e4ebc0ad7b 100644 --- a/templates/web/prod/WorkZone/ExposePublicationAssets.html.twig +++ b/templates/web/prod/WorkZone/ExposePublicationAssets.html.twig @@ -55,19 +55,19 @@ {% endif %} -{% for pubAsset in pubAssets %} -