Browse Source

various fixes

Olivier Massot 7 months ago
parent
commit
81b0651155

+ 1 - 0
config/opentalent/products.yaml

@@ -20,6 +20,7 @@ parameters:
           - SubdomainAvailability
           - UserSearchItem
           - DolibarrDocDownload
+          - Download
         roles:
           - ROLE_IMPORT
           - ROLE_TAGG

+ 1 - 0
src/Service/OnChange/Organization/OnParametersChange.php

@@ -37,6 +37,7 @@ class OnParametersChange extends OnChangeDefault
         // Une structure CMF n'a pas le droit de désactiver son site typo3
         if (
             $parameters->getDesactivateOpentalentSiteWeb() === true
+            && (!$context->previousData() || $context->previousData()->getDesactivateOpentalentSiteWeb() !== true)
             && $this->networkUtils->isCMFAndActiveNow($parameters->getOrganization())
         ) {
             throw new \RuntimeException('This structure is currently active in the CMF network, the website can not be disabled.');

+ 2 - 1
src/Validator/Organization/Parameters/MobytCredentialsValidator.php

@@ -35,7 +35,8 @@ class MobytCredentialsValidator extends ConstraintValidator
         try {
             return $this->mobytService->hasCredentialsCorrect($userNameSms, $passwordSms);
         } catch (\Exception) {
-            $this->context->buildViolation($constraint->payload)
+            $this->context
+                ->buildViolation("Invalid Mobyt credentials")
                 ->atPath('passwordSMS')
                 ->addViolation();