From 06193f2640c729c989290b8dd78fb18819d9caa9 Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Thu, 7 Sep 2023 14:51:35 +0300 Subject: [PATCH 1/5] PHRAS-3903 Admin - object inspector - record index debug tools (#4369) * add admin record index tools * add databox_id filter * add url encode * use options provider * return uri along with es result --------- Co-authored-by: jygaulier --- .../Controller/Admin/RootController.php | 38 +++++++++ .../Phrasea/ControllerProvider/Admin/Root.php | 6 ++ resources/locales/messages.de.xlf | 82 +++++++++++-------- resources/locales/messages.en.xlf | 82 +++++++++++-------- resources/locales/messages.fr.xlf | 82 +++++++++++-------- resources/locales/messages.nl.xlf | 82 +++++++++++-------- resources/locales/validators.de.xlf | 2 +- resources/locales/validators.en.xlf | 2 +- resources/locales/validators.fr.xlf | 2 +- resources/locales/validators.nl.xlf | 2 +- .../admin/inspector/record-index.html.twig | 48 +++++++++++ templates/web/admin/tree.html.twig | 6 ++ 12 files changed, 298 insertions(+), 136 deletions(-) create mode 100644 templates/web/admin/inspector/record-index.html.twig diff --git a/lib/Alchemy/Phrasea/Controller/Admin/RootController.php b/lib/Alchemy/Phrasea/Controller/Admin/RootController.php index f7a18b5c8d..c1086d519e 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/RootController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/RootController.php @@ -15,7 +15,9 @@ use Alchemy\Phrasea\Core\Event\Record\Structure\StatusBitEvent; use Alchemy\Phrasea\Core\Event\Record\Structure\StatusBitUpdatedEvent; use Alchemy\Phrasea\Exception\SessionNotFound; +use Alchemy\Phrasea\SearchEngine\Elastic\ElasticsearchOptions; use Alchemy\Phrasea\Status\StatusStructureProviderInterface; +use GuzzleHttp\Client; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; @@ -360,6 +362,42 @@ public function submitStatusBitAction(Request $request, $databox_id, $bit) { return $this->app->redirectPath('database_display_statusbit', ['databox_id' => $databox_id, 'success' => 1]); } + public function displayInspector(Request $request) + { + $databoxIds = array_map(function (\databox $databox) { + return $databox->get_sbas_id(); + }, + $this->app->getApplicationBox()->get_databoxes() + ); + + return $this->render('admin/inspector/record-index.html.twig', ['databoxIds' => $databoxIds]); + } + + public function getESRecord(Request $request) + { + $client = new Client(); + + /** @var ElasticsearchOptions $options */ + $options = $this->app['elasticsearch.options']; + + $uri = $options->getHost() . ":" . $options->getPort() . "/" . urlencode($options->getIndexName()) . "/record/" . urlencode($request->query->get('databoxId')) . "_" . urlencode($request->query->get('recordId')); + + $ret = [ + 'uri' => $uri + ]; + $js = $client->get($uri, ['http_errors' => false])->getBody()->getContents(); + $arr = json_decode($js,true); + if(is_null($arr)) { + $ret['result'] = "*** error decoding json ***"; + $ret['raw'] = $js; + } + else { + $ret['result'] = $arr; + } + + return json_encode($ret, JSON_PRETTY_PRINT, 512); + } + private function dispatchEvent($eventName, StatusBitEvent $event = null) { $this->app['dispatcher']->dispatch($eventName, $event); diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php index 3bc53b860e..b655fd065c 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/Root.php @@ -80,6 +80,12 @@ public function connect(Application $app) ->assert('bit', '\d+') ->bind('database_submit_statusbit'); + $controllers->get('/inspector/', 'controller.admin.root:displayInspector') + ->bind('admin_inspector'); + + $controllers->get('/inspector/record/', 'controller.admin.root:getESRecord') + ->bind('admin_inspector_record'); + return $controllers; } } diff --git a/resources/locales/messages.de.xlf b/resources/locales/messages.de.xlf index 1874383200..fa6ac04fca 100644 --- a/resources/locales/messages.de.xlf +++ b/resources/locales/messages.de.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -1459,8 +1459,8 @@ Bad request format, only JSON is allowed Bad Request Format, nur JSON wird erlaubt Controller/Root/AccountController.php - Controller/Admin/RootController.php - Controller/Admin/RootController.php + Controller/Admin/RootController.php + Controller/Admin/RootController.php Controller/Admin/DataboxController.php @@ -1603,7 +1603,7 @@ CHAMPS Felder - web/admin/tree.html.twig + web/admin/tree.html.twig Camera Model @@ -2792,7 +2792,7 @@ Email '%email%' for login '%login%' already exists in database Email '%email%' für Login '%login%' existiert schon in der Databank - Controller/Admin/UserController.php + Controller/Admin/UserController.php Email Name @@ -3309,7 +3309,7 @@ File is too big : 64k max Datei ist gross: 64k max. - Controller/Admin/RootController.php + Controller/Admin/RootController.php File upload has been cancelled @@ -4218,17 +4218,17 @@ Login %login% already exists in database Benutzername %login% existiert schon im Datenbank - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login %login% is already defined in the file at line %line% Benutzername %login% ist schon in Datei in Linie %line% definiert - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login line %line% is empty Benutzername Zeile %line% ist leer - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login to link your account @@ -4250,7 +4250,7 @@ Mail line %line% is empty Email Zeile %line% ist leer - Controller/Admin/UserController.php + Controller/Admin/UserController.php Mail sent @@ -4378,7 +4378,7 @@ Missing "structure" parameter Fehlende "Struktur" Parameter - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing labels parameter @@ -4394,7 +4394,7 @@ Missing path parameter Path Parameter fehlen - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing target collection @@ -4404,7 +4404,7 @@ Missing tests parameter Tests Parameter fehlen - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing view name parameter @@ -4959,7 +4959,7 @@ Password is empty at line %line% Passwort ist leer in Zeile %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Past year @@ -5261,7 +5261,7 @@ web/common/menubar.html.twig web/prod/index.html.twig admin/publications/wrapper.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig Publier @@ -5931,7 +5931,7 @@ SUBDEFS Unterauflösungen - web/admin/tree.html.twig + web/admin/tree.html.twig Save @@ -6266,7 +6266,7 @@ Something wrong happend Es ist etwas schief gelaufen ! - Controller/Admin/RootController.php + Controller/Admin/RootController.php Something wrong happened, please try again or contact an admin. @@ -6355,12 +6355,12 @@ Status icon upload failed : can not write on disk Status Ikone Upload ist fehlgeschlagen: kann nicht auf die Platte beschreiben - Controller/Admin/RootController.php + Controller/Admin/RootController.php Status icon upload failed : upload error Status Ikone Upload ist fehlgeschlagen: Upload Fehler - Controller/Admin/RootController.php + Controller/Admin/RootController.php Stop @@ -6623,7 +6623,7 @@ Controller/Prod/TOUController.php web/login/cgus.html.twig login/layout/base-layout.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig The Phraseanet Web API allows other web application to rely on this instance @@ -7697,7 +7697,7 @@ Worker Manager Worker Manager - web/admin/tree.html.twig + web/admin/tree.html.twig Would you like to continue ? @@ -7810,7 +7810,7 @@ You do not enough rights to update status Sie haben nicht die genügende Rechte, um den Status zu aktualisieren - Controller/Admin/RootController.php + Controller/Admin/RootController.php You do not have access to this basket @@ -8199,6 +8199,21 @@ admin/user/registrations.html.twig admin/user/registrations.html.twig + + admin:: find record + admin:: find record + admin/inspector/record-index.html.twig + + + admin:: object inspector + admin:: object inspector + web/admin/tree.html.twig + + + admin:: record index + admin:: record index + admin/inspector/record-index.html.twig + admin:: refuser l'acces Zugriff verboten @@ -8318,7 +8333,7 @@ admin::base: preferences de collection Kollektionseinstellungen - web/admin/tree.html.twig + web/admin/tree.html.twig admin::base: structure @@ -8524,7 +8539,7 @@ admin::collection: ordre des collections Kollektionen Ordnung - web/admin/tree.html.twig + web/admin/tree.html.twig admin::collection:: Gestionnaires des commandes @@ -8967,7 +8982,7 @@ admin::plugins: plugins Plugins admin/plugins/index.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig admin::plugins: retrieveConfigurationError @@ -9047,7 +9062,7 @@ admin::status: reglage des status Status Einstellungen - web/admin/tree.html.twig + web/admin/tree.html.twig admin::status: texte a afficher @@ -9069,7 +9084,7 @@ admin::structure: reglage de la structure Struktur Einstellung - web/admin/tree.html.twig + web/admin/tree.html.twig admin::sugval: Attention, passer en mode graphique implique la perte des modifications du xml si vous n'appliquez pas les changements avant. @@ -9384,7 +9399,7 @@ admin::utilisateurs: bases de donnees Datenbanken - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: demandes en cours @@ -9394,14 +9409,14 @@ admin::utilisateurs: gestionnaire de taches Aufgabe-Scheduler - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs Benutzer web/admin/tree.html.twig - web/admin/tree.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs connectes @@ -10477,6 +10492,7 @@ button::choose databox Alle Databox admin/worker-manager/worker_info.html.twig + admin/inspector/record-index.html.twig web/admin/editusers.html.twig web/admin/editusers.html.twig @@ -11589,12 +11605,12 @@ login::register:email: Vous avez ete accepte sur les collections suivantes : Ihr Zugriff wurde für die folgende Kollektionen genehmigt : - Controller/Admin/UserController.php + Controller/Admin/UserController.php login::register:email: Vous avez ete refuse sur les collections suivantes : Ihr Zugriff wurde für die folgende Kollektionen abgelehnt : - Controller/Admin/UserController.php + Controller/Admin/UserController.php mai diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index 67bf518067..2089da2627 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -1460,8 +1460,8 @@ Bad request format, only JSON is allowed Bad request format. Only JSON is allowed. Controller/Root/AccountController.php - Controller/Admin/RootController.php - Controller/Admin/RootController.php + Controller/Admin/RootController.php + Controller/Admin/RootController.php Controller/Admin/DataboxController.php @@ -1604,7 +1604,7 @@ CHAMPS Fields setup - web/admin/tree.html.twig + web/admin/tree.html.twig Camera Model @@ -2795,7 +2795,7 @@ Email '%email%' for login '%login%' already exists in database E-mail '%email%' for login '%login%' already exists in database - Controller/Admin/UserController.php + Controller/Admin/UserController.php Email Name @@ -3312,7 +3312,7 @@ File is too big : 64k max File is too large: 64kb max. - Controller/Admin/RootController.php + Controller/Admin/RootController.php File upload has been cancelled @@ -4221,17 +4221,17 @@ Login %login% already exists in database Login %login% already exists in database - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login %login% is already defined in the file at line %line% Login %login% already exists in the file line %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login line %line% is empty Login line %line% is empty - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login to link your account @@ -4253,7 +4253,7 @@ Mail line %line% is empty E-mail line %line% is empty - Controller/Admin/UserController.php + Controller/Admin/UserController.php Mail sent @@ -4381,7 +4381,7 @@ Missing "structure" parameter Missing "structure" parameter - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing labels parameter @@ -4397,7 +4397,7 @@ Missing path parameter Missing path parameter - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing target collection @@ -4407,7 +4407,7 @@ Missing tests parameter Missing test parameter - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing view name parameter @@ -4962,7 +4962,7 @@ Password is empty at line %line% Password is empty in line %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Past year @@ -5264,7 +5264,7 @@ web/common/menubar.html.twig web/prod/index.html.twig admin/publications/wrapper.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig Publier @@ -5934,7 +5934,7 @@ SUBDEFS Subviews setup - web/admin/tree.html.twig + web/admin/tree.html.twig Save @@ -6269,7 +6269,7 @@ Something wrong happend Something wrong happened - Controller/Admin/RootController.php + Controller/Admin/RootController.php Something wrong happened, please try again or contact an admin. @@ -6358,12 +6358,12 @@ Status icon upload failed : can not write on disk Status icon upload failed: cannot write on disk - Controller/Admin/RootController.php + Controller/Admin/RootController.php Status icon upload failed : upload error Status icon upload failed: upload error - Controller/Admin/RootController.php + Controller/Admin/RootController.php Stop @@ -6626,7 +6626,7 @@ Controller/Prod/TOUController.php web/login/cgus.html.twig login/layout/base-layout.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig The Phraseanet Web API allows other web application to rely on this instance @@ -7700,7 +7700,7 @@ Worker Manager Worker Manager - web/admin/tree.html.twig + web/admin/tree.html.twig Would you like to continue ? @@ -7813,7 +7813,7 @@ You do not enough rights to update status Your user right do not allow you to change document status - Controller/Admin/RootController.php + Controller/Admin/RootController.php You do not have access to this basket @@ -8202,6 +8202,21 @@ admin/user/registrations.html.twig admin/user/registrations.html.twig + + admin:: find record + admin:: find record + admin/inspector/record-index.html.twig + + + admin:: object inspector + admin:: object inspector + web/admin/tree.html.twig + + + admin:: record index + admin:: record index + admin/inspector/record-index.html.twig + admin:: refuser l'acces Deny access @@ -8321,7 +8336,7 @@ admin::base: preferences de collection Collection Settings - web/admin/tree.html.twig + web/admin/tree.html.twig admin::base: structure @@ -8527,7 +8542,7 @@ admin::collection: ordre des collections Collection Order - web/admin/tree.html.twig + web/admin/tree.html.twig admin::collection:: Gestionnaires des commandes @@ -8970,7 +8985,7 @@ admin::plugins: plugins Plugins admin/plugins/index.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig admin::plugins: retrieveConfigurationError @@ -9050,7 +9065,7 @@ admin::status: reglage des status Status setup - web/admin/tree.html.twig + web/admin/tree.html.twig admin::status: texte a afficher @@ -9072,7 +9087,7 @@ admin::structure: reglage de la structure Structure setup - web/admin/tree.html.twig + web/admin/tree.html.twig admin::sugval: Attention, passer en mode graphique implique la perte des modifications du xml si vous n'appliquez pas les changements avant. @@ -9387,7 +9402,7 @@ admin::utilisateurs: bases de donnees Databases - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: demandes en cours @@ -9397,14 +9412,14 @@ admin::utilisateurs: gestionnaire de taches Task Manager - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs Users web/admin/tree.html.twig - web/admin/tree.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs connectes @@ -10480,6 +10495,7 @@ button::choose databox All Databox admin/worker-manager/worker_info.html.twig + admin/inspector/record-index.html.twig web/admin/editusers.html.twig web/admin/editusers.html.twig @@ -11592,12 +11608,12 @@ login::register:email: Vous avez ete accepte sur les collections suivantes : Your access has been granted on these bases and collections: - Controller/Admin/UserController.php + Controller/Admin/UserController.php login::register:email: Vous avez ete refuse sur les collections suivantes : Your access has been denied to the following databases and collections: - Controller/Admin/UserController.php + Controller/Admin/UserController.php mai diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 5da62e48ab..e3088d3ee5 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -1459,8 +1459,8 @@ Bad request format, only JSON is allowed Mauvais format de requête. Seul JSON est autorisé. Controller/Root/AccountController.php - Controller/Admin/RootController.php - Controller/Admin/RootController.php + Controller/Admin/RootController.php + Controller/Admin/RootController.php Controller/Admin/DataboxController.php @@ -1603,7 +1603,7 @@ CHAMPS Champs - web/admin/tree.html.twig + web/admin/tree.html.twig Camera Model @@ -2792,7 +2792,7 @@ Email '%email%' for login '%login%' already exists in database L'adresse e-mail '%email%' pour l'identifiant '%login%' existe déjà dans la base - Controller/Admin/UserController.php + Controller/Admin/UserController.php Email Name @@ -3309,7 +3309,7 @@ File is too big : 64k max Le poids du fichier ne peut dépasser 64 Ko - Controller/Admin/RootController.php + Controller/Admin/RootController.php File upload has been cancelled @@ -4218,17 +4218,17 @@ Login %login% already exists in database L'identifiant %login% existe déjà dans la base de données - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login %login% is already defined in the file at line %line% L'identifiant %login% est déjà mentionné dans le fichier à la ligne %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login line %line% is empty L'identifiant n'est pas renseigné à la ligne %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login to link your account @@ -4250,7 +4250,7 @@ Mail line %line% is empty L'adresse e-mail n'est pas renseignée à la ligne %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Mail sent @@ -4378,7 +4378,7 @@ Missing "structure" parameter Le paramètre "structure" est manquant - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing labels parameter @@ -4394,7 +4394,7 @@ Missing path parameter Paramètre Path (Chemin d'accès) manquant - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing target collection @@ -4404,7 +4404,7 @@ Missing tests parameter Paramètre de test manquant - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing view name parameter @@ -4959,7 +4959,7 @@ Password is empty at line %line% Le mot de passe est vide à la ligne %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Past year @@ -5261,7 +5261,7 @@ web/common/menubar.html.twig web/prod/index.html.twig admin/publications/wrapper.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig Publier @@ -5931,7 +5931,7 @@ SUBDEFS Sous-définitions - web/admin/tree.html.twig + web/admin/tree.html.twig Save @@ -6266,7 +6266,7 @@ Something wrong happend Un problème est survenu - Controller/Admin/RootController.php + Controller/Admin/RootController.php Something wrong happened, please try again or contact an admin. @@ -6355,12 +6355,12 @@ Status icon upload failed : can not write on disk L'ajout de l'icône de Status a échoué, impossible d'écrire sur le disque - Controller/Admin/RootController.php + Controller/Admin/RootController.php Status icon upload failed : upload error L'ajout de l'icône de Status a échoué - Controller/Admin/RootController.php + Controller/Admin/RootController.php Stop @@ -6623,7 +6623,7 @@ Controller/Prod/TOUController.php web/login/cgus.html.twig login/layout/base-layout.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig The Phraseanet Web API allows other web application to rely on this instance @@ -7697,7 +7697,7 @@ Worker Manager Worker Manager - web/admin/tree.html.twig + web/admin/tree.html.twig Would you like to continue ? @@ -7810,7 +7810,7 @@ You do not enough rights to update status Vous ne disposez pas des droits suffisants pour changer les Status - Controller/Admin/RootController.php + Controller/Admin/RootController.php You do not have access to this basket @@ -8199,6 +8199,21 @@ admin/user/registrations.html.twig admin/user/registrations.html.twig + + admin:: find record + admin:: find record + admin/inspector/record-index.html.twig + + + admin:: object inspector + admin:: object inspector + web/admin/tree.html.twig + + + admin:: record index + admin:: record index + admin/inspector/record-index.html.twig + admin:: refuser l'acces Refuser l'accès @@ -8318,7 +8333,7 @@ admin::base: preferences de collection Réglages de collection - web/admin/tree.html.twig + web/admin/tree.html.twig admin::base: structure @@ -8524,7 +8539,7 @@ admin::collection: ordre des collections Ordre des collections - web/admin/tree.html.twig + web/admin/tree.html.twig admin::collection:: Gestionnaires des commandes @@ -8968,7 +8983,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::plugins: plugins Plugins admin/plugins/index.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig admin::plugins: retrieveConfigurationError @@ -9048,7 +9063,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::status: reglage des status Réglage des Status - web/admin/tree.html.twig + web/admin/tree.html.twig admin::status: texte a afficher @@ -9070,7 +9085,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::structure: reglage de la structure Réglage de la structure - web/admin/tree.html.twig + web/admin/tree.html.twig admin::sugval: Attention, passer en mode graphique implique la perte des modifications du xml si vous n'appliquez pas les changements avant. @@ -9385,7 +9400,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::utilisateurs: bases de donnees Bases - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: demandes en cours @@ -9395,14 +9410,14 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::utilisateurs: gestionnaire de taches Gestionnaire de tâches - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs Utilisateurs web/admin/tree.html.twig - web/admin/tree.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs connectes @@ -10478,6 +10493,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le button::choose databox Toutes les Databox admin/worker-manager/worker_info.html.twig + admin/inspector/record-index.html.twig web/admin/editusers.html.twig web/admin/editusers.html.twig @@ -11590,12 +11606,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le login::register:email: Vous avez ete accepte sur les collections suivantes : Votre accès a été validé pour les collections suivantes : - Controller/Admin/UserController.php + Controller/Admin/UserController.php login::register:email: Vous avez ete refuse sur les collections suivantes : Votre accès a été refusé pour les collections suivantes : - Controller/Admin/UserController.php + Controller/Admin/UserController.php mai diff --git a/resources/locales/messages.nl.xlf b/resources/locales/messages.nl.xlf index bfd76e81c4..426a0b9ee6 100644 --- a/resources/locales/messages.nl.xlf +++ b/resources/locales/messages.nl.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -1460,8 +1460,8 @@ Bad request format, only JSON is allowed Slecht verzoek formaat, enkel JSON is toegestaan Controller/Root/AccountController.php - Controller/Admin/RootController.php - Controller/Admin/RootController.php + Controller/Admin/RootController.php + Controller/Admin/RootController.php Controller/Admin/DataboxController.php @@ -1604,7 +1604,7 @@ CHAMPS VELDEN - web/admin/tree.html.twig + web/admin/tree.html.twig Camera Model @@ -2795,7 +2795,7 @@ Email '%email%' for login '%login%' already exists in database Email '%email%' for login '%login%' already exists in database - Controller/Admin/UserController.php + Controller/Admin/UserController.php Email Name @@ -3315,7 +3315,7 @@ File is too big : 64k max File is te groot : 64k max - Controller/Admin/RootController.php + Controller/Admin/RootController.php File upload has been cancelled @@ -4224,17 +4224,17 @@ Login %login% already exists in database Login %login% already exists in database - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login %login% is already defined in the file at line %line% Login %login% is already defined in the file at line %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login line %line% is empty Login line %line% is empty - Controller/Admin/UserController.php + Controller/Admin/UserController.php Login to link your account @@ -4256,7 +4256,7 @@ Mail line %line% is empty Mail line %line% is empty - Controller/Admin/UserController.php + Controller/Admin/UserController.php Mail sent @@ -4384,7 +4384,7 @@ Missing "structure" parameter Missing "structure" parameter - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing labels parameter @@ -4400,7 +4400,7 @@ Missing path parameter Pad parameter ontbreekt - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing target collection @@ -4410,7 +4410,7 @@ Missing tests parameter Test parameter ontbreekt - Controller/Admin/RootController.php + Controller/Admin/RootController.php Missing view name parameter @@ -4965,7 +4965,7 @@ Password is empty at line %line% Password is empty at line %line% - Controller/Admin/UserController.php + Controller/Admin/UserController.php Past year @@ -5267,7 +5267,7 @@ web/common/menubar.html.twig web/prod/index.html.twig admin/publications/wrapper.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig Publier @@ -5937,7 +5937,7 @@ SUBDEFS THUMBNAILS - web/admin/tree.html.twig + web/admin/tree.html.twig Save @@ -6272,7 +6272,7 @@ Something wrong happend Er is iets verkeerd gelopen - Controller/Admin/RootController.php + Controller/Admin/RootController.php Something wrong happened, please try again or contact an admin. @@ -6361,12 +6361,12 @@ Status icon upload failed : can not write on disk Status icon upload niet gelukt : kan niet naar de schijf schrijven - Controller/Admin/RootController.php + Controller/Admin/RootController.php Status icon upload failed : upload error Status icon upload niet gelukt : upload fout - Controller/Admin/RootController.php + Controller/Admin/RootController.php Stop @@ -6629,7 +6629,7 @@ Controller/Prod/TOUController.php web/login/cgus.html.twig login/layout/base-layout.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig The Phraseanet Web API allows other web application to rely on this instance @@ -7703,7 +7703,7 @@ Worker Manager Worker Manager - web/admin/tree.html.twig + web/admin/tree.html.twig Would you like to continue ? @@ -7816,7 +7816,7 @@ You do not enough rights to update status U hebt niet voldoende rechten om de status up te date - Controller/Admin/RootController.php + Controller/Admin/RootController.php You do not have access to this basket @@ -8205,6 +8205,21 @@ admin/user/registrations.html.twig admin/user/registrations.html.twig + + admin:: find record + admin:: find record + admin/inspector/record-index.html.twig + + + admin:: object inspector + admin:: object inspector + web/admin/tree.html.twig + + + admin:: record index + admin:: record index + admin/inspector/record-index.html.twig + admin:: refuser l'acces Weiger de toegang @@ -8324,7 +8339,7 @@ admin::base: preferences de collection voorkeuren van de collectie - web/admin/tree.html.twig + web/admin/tree.html.twig admin::base: structure @@ -8530,7 +8545,7 @@ admin::collection: ordre des collections volgorde van de collecties - web/admin/tree.html.twig + web/admin/tree.html.twig admin::collection:: Gestionnaires des commandes @@ -8973,7 +8988,7 @@ admin::plugins: plugins admin::plugins: plugins admin/plugins/index.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig admin::plugins: retrieveConfigurationError @@ -9053,7 +9068,7 @@ admin::status: reglage des status statusinstellingen - web/admin/tree.html.twig + web/admin/tree.html.twig admin::status: texte a afficher @@ -9075,7 +9090,7 @@ admin::structure: reglage de la structure structuurinstellingen - web/admin/tree.html.twig + web/admin/tree.html.twig admin::sugval: Attention, passer en mode graphique implique la perte des modifications du xml si vous n'appliquez pas les changements avant. @@ -9390,7 +9405,7 @@ admin::utilisateurs: bases de donnees datables - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: demandes en cours @@ -9400,14 +9415,14 @@ admin::utilisateurs: gestionnaire de taches taak beheerder - web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs gebruikers web/admin/tree.html.twig - web/admin/tree.html.twig - web/admin/tree.html.twig + web/admin/tree.html.twig + web/admin/tree.html.twig admin::utilisateurs: utilisateurs connectes @@ -10483,6 +10498,7 @@ button::choose databox button::choose databox admin/worker-manager/worker_info.html.twig + admin/inspector/record-index.html.twig web/admin/editusers.html.twig web/admin/editusers.html.twig @@ -11595,12 +11611,12 @@ login::register:email: Vous avez ete accepte sur les collections suivantes : login::register:email: Vous avez ete accepte sur les collections suivantes : - Controller/Admin/UserController.php + Controller/Admin/UserController.php login::register:email: Vous avez ete refuse sur les collections suivantes : login::register:email: Vous avez ete refuse sur les collections suivantes : - Controller/Admin/UserController.php + Controller/Admin/UserController.php mai diff --git a/resources/locales/validators.de.xlf b/resources/locales/validators.de.xlf index de81b9ebcd..1113fe54a0 100644 --- a/resources/locales/validators.de.xlf +++ b/resources/locales/validators.de.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.en.xlf b/resources/locales/validators.en.xlf index a4d565691a..acf75f2c72 100644 --- a/resources/locales/validators.en.xlf +++ b/resources/locales/validators.en.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.fr.xlf b/resources/locales/validators.fr.xlf index c0989b4546..e9c5343de7 100644 --- a/resources/locales/validators.fr.xlf +++ b/resources/locales/validators.fr.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.nl.xlf b/resources/locales/validators.nl.xlf index c0f830e93a..ce014db152 100644 --- a/resources/locales/validators.nl.xlf +++ b/resources/locales/validators.nl.xlf @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/templates/web/admin/inspector/record-index.html.twig b/templates/web/admin/inspector/record-index.html.twig new file mode 100644 index 0000000000..abed2104be --- /dev/null +++ b/templates/web/admin/inspector/record-index.html.twig @@ -0,0 +1,48 @@ + + +
+ + + + + +
+ +
+
+
+    
+
+ + diff --git a/templates/web/admin/tree.html.twig b/templates/web/admin/tree.html.twig index 349e9a8fc0..3c70a3938c 100644 --- a/templates/web/admin/tree.html.twig +++ b/templates/web/admin/tree.html.twig @@ -65,6 +65,12 @@ {% trans %}Auth failure{% endtrans %} +
  • + + + {{ 'admin:: object inspector' | trans }} + +
  • {% endif %} {% if app.getAclForUser(app.getAuthenticatedUser()).has_right(constant('\\ACL::BAS_CHUPUB')) %} From 4326bc7e3d6caee3f592ab35a99a33f59c2efb54 Mon Sep 17 00:00:00 2001 From: moctardiouf Date: Thu, 7 Sep 2023 15:29:19 +0200 Subject: [PATCH 2/5] PHRAS-3904 Add server port on fastcgi https conf (#4370) * Update entrypoint.sh * Update entrypoint.sh * enhance GATEWAY_FASTCGI_HTTPS management script --------- Co-authored-by: Gaspard Jacobson <52928254+gjacobjn@users.noreply.github.com> --- docker/nginx/root/entrypoint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/nginx/root/entrypoint.sh b/docker/nginx/root/entrypoint.sh index 313744a81b..d38a2548ea 100755 --- a/docker/nginx/root/entrypoint.sh +++ b/docker/nginx/root/entrypoint.sh @@ -13,13 +13,16 @@ else fi if [ ! -z "$GATEWAY_FASTCGI_HTTPS" ]; then - echo "GATEWAY_FASTCGI_HTTPS is defined : $GATEWAY_FASTCGI_HTTPS" - GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" + if [ "$GATEWAY_FASTCGI_HTTPS" = "on" ] || [ "$GATEWAY_FASTCGI_HTTPS" = "1" ];then + echo "SETTING SERVER_PORT TO: 443" + GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS on;fastcgi_param SERVER_PORT 443;" + else + GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" + fi else echo "NO GATEWAY_FASTCGI_HTTPS is defined" GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS on;fastcgi_param SERVER_PORT 443;" - fi cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_SEND_TIMEOUT/$GATEWAY_SEND_TIMEOUT/g" | sed "s/\$GATEWAY_FASTCGI_TIMEOUT/$GATEWAY_FASTCGI_TIMEOUT/g" | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_PROXY_TIMEOUT/$GATEWAY_PROXY_TIMEOUT/g" | sed "s/\$NEW_TARGET/$NEW_TARGET/g" | sed "s/\$NEW_RESOLVER/$NEW_RESOLVER/g" | sed "s/\$GATEWAY_FASTCGI_HTTPS/$GATEWAY_FASTCGI_HTTPS/g" > /etc/nginx/conf.d/default.conf From bd282ed6b327995054c2d3bffb449a7b3229b0e9 Mon Sep 17 00:00:00 2001 From: Nicolas Maillat Date: Thu, 7 Sep 2023 16:13:54 +0200 Subject: [PATCH 3/5] PHRAS-3416 phraseanet localization (#4371) * Translated using Weblate (German) Currently translated at 99.3% (2998 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/de/ * Translated using Weblate (English) Currently translated at 99.4% (3001 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (German) Currently translated at 99.3% (2998 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/de/ * Translated using Weblate (English) Currently translated at 99.5% (3002 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (English) Currently translated at 99.5% (3002 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (French) Currently translated at 99.4% (3001 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/fr/ * Translated using Weblate (German) Currently translated at 99.3% (2998 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/de/ * Translated using Weblate (English) Currently translated at 99.5% (3004 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (English) Currently translated at 99.5% (3004 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (French) Currently translated at 99.4% (3001 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/fr/ * Translated using Weblate (German) Currently translated at 99.3% (2998 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/de/ * Translated using Weblate (English) Currently translated at 99.5% (3004 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (English) Currently translated at 99.5% (3004 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (French) Currently translated at 99.4% (3001 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/fr/ * Translated using Weblate (German) Currently translated at 99.4% (3000 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/de/ * Translated using Weblate (English) Currently translated at 99.6% (3006 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/en/ * Translated using Weblate (French) Currently translated at 99.5% (3003 of 3017 strings) Translation: Phraseanet/Phraseanet master message Translate-URL: https://hosted.weblate.org/projects/phraseanet/phraseanet-master-message/fr/ --------- Co-authored-by: Jennifer Piva --- resources/locales/messages.de.xlf | 32 +++++++++++++------------- resources/locales/messages.en.xlf | 38 +++++++++++++++---------------- resources/locales/messages.fr.xlf | 30 ++++++++++++------------ 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/resources/locales/messages.de.xlf b/resources/locales/messages.de.xlf index fa6ac04fca..b40339ca02 100644 --- a/resources/locales/messages.de.xlf +++ b/resources/locales/messages.de.xlf @@ -1,4 +1,4 @@ - +
    @@ -7,8 +7,8 @@
    - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -195,7 +195,7 @@ Bridge/Dailymotion/element_informations.html.twig - selectionnes]]> + %number% documents<br/>selectionnes ausgewählt]]> Controller/Prod/QueryController.php @@ -2544,7 +2544,7 @@ Form/Configuration/ActionsFormType.php - + Display & action settings Anzeige und Handlung-Einstellungen admin/fields/templates.html.twig @@ -8177,7 +8177,7 @@ admin:: auth failure list - admin:: auth failure list + Authentifizierungsfehler Liste web/admin/auth-failure.html.twig @@ -8201,17 +8201,17 @@ admin:: find record - admin:: find record + Ansehen admin/inspector/record-index.html.twig admin:: object inspector - admin:: object inspector + Objektinspektor web/admin/tree.html.twig admin:: record index - admin:: record index + Datensatz-Index admin/inspector/record-index.html.twig @@ -9218,7 +9218,7 @@ admin::users: delete auth failure - admin::users: delete auth failure + Authentifizierungsfehler löschen web/admin/auth-failure.html.twig @@ -9228,7 +9228,7 @@ admin::users: erase auth failure table - admin::users: erase auth failure table + Alle Authentifizierungsfehler löschen web/admin/auth-failure.html.twig @@ -9255,7 +9255,7 @@ admin::users: locked - admin::users: locked + locked web/admin/auth-failure.html.twig @@ -12426,7 +12426,7 @@ Controller/Root/AccountController.php - >]]> + phraseanet::account: << your account can be deleted via admin interface >> Ihr Benutzerkonto kann nur durch die Administration Anwendung gelöscht werden. web/account/account.html.twig @@ -12694,7 +12694,7 @@ preview::tab geolocalisation - Geolokalisierung + Geolokalisierung Controller/Prod/LanguageController.php @@ -13033,7 +13033,7 @@ prod::advancesearch see real field name - Realen Feldname anzeigen + Realen Feldname anzeigen web/prod/index.html.twig @@ -15566,7 +15566,7 @@ Vorsicht: die aktuelle Werte werden durch die neue Werte überschrieben web/thesaurus/thesaurus.html.twig - + thesaurus:: Supprimer cette branche ?&#10;(les termes concernes remonteront en candidats a la prochaine indexation) web/thesaurus/thesaurus.html.twig diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index 2089da2627..058fa64249 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -1,4 +1,4 @@ - +
    @@ -7,8 +7,8 @@
    - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -195,7 +195,7 @@ Bridge/Dailymotion/element_informations.html.twig - selectionnes]]> + %number% documents<br/>selectionnes selected]]> Controller/Prod/QueryController.php @@ -2547,7 +2547,7 @@ Form/Configuration/ActionsFormType.php - + Display & action settings Display and action settings admin/fields/templates.html.twig @@ -8180,7 +8180,7 @@ admin:: auth failure list - admin:: auth failure list + Authentication failure list web/admin/auth-failure.html.twig @@ -8204,17 +8204,17 @@ admin:: find record - admin:: find record + View admin/inspector/record-index.html.twig admin:: object inspector - admin:: object inspector + Object inspector web/admin/tree.html.twig admin:: record index - admin:: record index + Record index admin/inspector/record-index.html.twig @@ -9221,7 +9221,7 @@ admin::users: delete auth failure - admin::users: delete auth failure + delete auth failure web/admin/auth-failure.html.twig @@ -9231,7 +9231,7 @@ admin::users: erase auth failure table - admin::users: erase auth failure table + Delete all auth failures web/admin/auth-failure.html.twig @@ -9258,7 +9258,7 @@ admin::users: locked - admin::users: locked + locked web/admin/auth-failure.html.twig @@ -9529,7 +9529,7 @@ admin::workermanager:tab:queueMonitor: consumed queues - Display only consumed queues + Display only consumed queues admin/worker-manager/worker_queue_monitor.html.twig @@ -12429,7 +12429,7 @@ Controller/Root/AccountController.php - >]]> + phraseanet::account: << your account can be deleted via admin interface >> Your rights do not allow to perform this action. Your account can only be deleted via the Administration interface. web/account/account.html.twig @@ -12697,7 +12697,7 @@ preview::tab geolocalisation - Geolocation + Geolocation Controller/Prod/LanguageController.php @@ -13036,12 +13036,12 @@ prod::advancesearch see real field name - Display real field name + Display real field name web/prod/index.html.twig prod::advancesearch: Add - Add + Add web/prod/index.html.twig @@ -13703,7 +13703,7 @@ Warning: The current values will be overwritten by these new values prod::workzone:facet see more - More + More Controller/Prod/LanguageController.php @@ -15572,7 +15572,7 @@ It is possible to place several search areas web/thesaurus/thesaurus.html.twig - + thesaurus:: Supprimer cette branche ?&#10;(les termes concernes remonteront en candidats a la prochaine indexation) web/thesaurus/thesaurus.html.twig diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index e3088d3ee5..24b29ad65e 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -1,4 +1,4 @@ - +
    @@ -7,8 +7,8 @@
    - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -195,7 +195,7 @@ Bridge/Dailymotion/element_informations.html.twig - selectionnes]]> + %number% documents<br/>selectionnes sélectionnés]]> Controller/Prod/QueryController.php @@ -2544,7 +2544,7 @@ Form/Configuration/ActionsFormType.php - + Display & action settings Paramétrage d'affichage et d'action admin/fields/templates.html.twig @@ -8201,17 +8201,17 @@ admin:: find record - admin:: find record + Voir admin/inspector/record-index.html.twig admin:: object inspector - admin:: object inspector + Inspecteur web/admin/tree.html.twig admin:: record index - admin:: record index + Index des enregistrements admin/inspector/record-index.html.twig @@ -9219,7 +9219,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::users: delete auth failure - admin::users: delete auth failure + Supprimer l'échec d'authentification web/admin/auth-failure.html.twig @@ -9229,7 +9229,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::users: erase auth failure table - admin::users: erase auth failure table + Supprimer toutes les erreurs d'authentification web/admin/auth-failure.html.twig @@ -9256,7 +9256,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::users: locked - admin::users: locked + locked web/admin/auth-failure.html.twig @@ -12427,7 +12427,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Controller/Root/AccountController.php - >]]> + phraseanet::account: << your account can be deleted via admin interface >> Vos droits ne vous permettent pas de réaliser cette action, votre compte ne peut être supprimé que via l'interface d'Administration. web/account/account.html.twig @@ -12695,7 +12695,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le preview::tab geolocalisation - Géolocalisation + Géolocalisation Controller/Prod/LanguageController.php @@ -13034,7 +13034,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::advancesearch see real field name - Afficher le nom réel du champ + Afficher le nom réel du champ web/prod/index.html.twig @@ -15575,7 +15575,7 @@ Attention: les valeurs actuellement en place seront écrasées par ces nouvelles web/thesaurus/thesaurus.html.twig - + thesaurus:: Supprimer cette branche ?&#10;(les termes concernes remonteront en candidats a la prochaine indexation) web/thesaurus/thesaurus.html.twig From 42144daf2698731195503a5c9e11e7b9306371c1 Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:07:25 +0300 Subject: [PATCH 4/5] PHRAS-3826 add mask password argument (#4372) * add mask password argument * test --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a26dea540..d5ceac48c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,8 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 + with: + mask-password: 'true' - uses: docker/setup-qemu-action@v2 - uses: docker/setup-buildx-action@v2 From f3d8159868579ec67a6f7d7ffa416d9c71b40fa1 Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:08:29 +0300 Subject: [PATCH 5/5] PHRAS-3889 Worker - metadata write - mime/type whitelist - write metadatas only on whitelisted files (#4366) * write meta only on whitelist mimetype * bump version * add some mimetype * PHRAS-3896 : patch for checking the current value of populate_order in file config/configuration.yml and set to populate_order: RECORD_ID --- .env | 2 +- lib/Alchemy/Phrasea/Core/Version.php | 2 +- .../Subscriber/RecordSubscriber.php | 20 ++++- lib/classes/patch/418RC6.php | 87 +++++++++++++++++++ lib/conf.d/configuration.yml | 7 ++ 5 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 lib/classes/patch/418RC6.php diff --git a/.env b/.env index be38e1c6ca..80272828fb 100644 --- a/.env +++ b/.env @@ -133,7 +133,7 @@ PHRASEANET_DOCKER_REGISTRY=local # Docker images tag. # @run -PHRASEANET_DOCKER_TAG=4.1.8-rc5 +PHRASEANET_DOCKER_TAG=4.1.8-rc6 # Stack Name # An optionnal Name for the stack diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index eab14c1789..ed7b9b1805 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -17,7 +17,7 @@ class Version * @var string */ - private $number = '4.1.8-rc5'; + private $number = '4.1.8-rc6'; /** * @var string diff --git a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php index 92b6133856..781cb550a4 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php @@ -154,6 +154,7 @@ public function onRecordsWriteMeta(RecordsWriteMetaEvent $event) { $databoxId = $event->getDataboxId(); $recordIds = $event->getRecordIds(); + $acceptedMimeTypes = $this->app['conf']->get(['workers', 'writeMetadatas', 'acceptedMimeType'], []); foreach ($recordIds as $recordId) { $mediaSubdefRepository = $this->getMediaSubdefRepository($databoxId); @@ -173,7 +174,13 @@ public function onRecordsWriteMeta(RecordsWriteMetaEvent $event) foreach ($mediaSubdefs as $subdef) { // check subdefmetadatarequired from the subview setup in admin - if (($subdef->get_name() == 'document' && $toWritemetaOriginalDocument) || $this->isSubdefMetadataUpdateRequired($databox, $type, $subdef->get_name())) { + // check if we want to write meta in this mime type + if (in_array(trim($subdef->get_mime()), $acceptedMimeTypes) && + ( + ($subdef->get_name() == 'document' && $toWritemetaOriginalDocument) || + $this->isSubdefMetadataUpdateRequired($databox, $type, $subdef->get_name()) + ) + ) { $payload = [ 'message_type' => MessagePublisher::WRITE_METADATAS_TYPE, 'payload' => [ @@ -182,7 +189,6 @@ public function onRecordsWriteMeta(RecordsWriteMetaEvent $event) 'subdefName' => $subdef->get_name() ] ]; - if ($subdef->is_physically_present()) { $this->messagePublisher->publishMessage($payload, MessagePublisher::WRITE_METADATAS_TYPE); } @@ -273,6 +279,8 @@ public function onSubdefinitionWritemeta(SubdefinitionWritemetaEvent $event) } else { + $acceptedMimeTypes = $this->app['conf']->get(['workers', 'writeMetadatas', 'acceptedMimeType'], []); + $databoxId = $event->getRecord()->getDataboxId(); $recordId = $event->getRecord()->getRecordId(); @@ -291,7 +299,13 @@ public function onSubdefinitionWritemeta(SubdefinitionWritemetaEvent $event) } // only the required writemetadata from admin > subview setup is to be writing - if (($subdef->get_name() == 'document' && $toWritemetaOriginalDocument) || $this->isSubdefMetadataUpdateRequired($databox, $type, $subdef->get_name())) { + // check if we want to write meta in this mime type + if (in_array($subdef->get_mime(), $acceptedMimeTypes) && + ( + ($subdef->get_name() == 'document' && $toWritemetaOriginalDocument) || + $this->isSubdefMetadataUpdateRequired($databox, $type, $subdef->get_name()) + ) + ) { $payload = [ 'message_type' => MessagePublisher::WRITE_METADATAS_TYPE, 'payload' => [ diff --git a/lib/classes/patch/418RC6.php b/lib/classes/patch/418RC6.php new file mode 100644 index 0000000000..3b4aff11d3 --- /dev/null +++ b/lib/classes/patch/418RC6.php @@ -0,0 +1,87 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function getDoctrineMigrations() + { + return []; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function apply(base $base, Application $app) + { + if ($base->get_base_type() === base::DATA_BOX) { + $this->patch_databox($base, $app); + } elseif ($base->get_base_type() === base::APPLICATION_BOX) { + $this->patch_appbox($base, $app); + } + + return true; + } + + private function patch_databox(databox $databox, Application $app) + { + } + + private function patch_appbox(base $appbox, Application $app) + { + /** @var PropertyAccess $conf */ + $conf = $app['conf']; + + // PHRAS-3889 + if (!$conf->has(['workers', 'writeMetadatas', 'acceptedMimeType'])) { + $defaultAcceptedMimeType = [ + 'image/jpeg', + 'image/png', + 'application/postscript', + 'application/pdf', + 'image/tiff' + ]; + + $conf->set(['workers', 'writeMetadatas', 'acceptedMimeType'], $defaultAcceptedMimeType); + } + + // PHRAS-3896 + if ($conf->get(['main', 'search-engine', 'options', 'populate_order']) != 'RECORD_ID') { + $conf->set(['main', 'search-engine', 'options', 'populate_order'], 'RECORD_ID'); + } + } +} diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 282e693441..dab5d447e5 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -416,6 +416,13 @@ workers: max_retry: 3 ttl_retry: 10000 ttl_delayed: 5000 + writeMetadatas: + acceptedMimeType: + - image/jpeg + - image/png + - application/postscript + - application/pdf + - image/tiff externalservice: ginger: AutoSubtitling: