]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/DeveloperController.php
Merge pull request #3245 from wallabag/fix-bc
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / DeveloperController.php
index 550c06087cd6329f7901709f6f21bef6adef8395..9cb73f4cf0b1778cc29197b6589de0c1ec894b17 100644 (file)
@@ -42,8 +42,8 @@ class DeveloperController extends Controller
         $clientForm = $this->createForm(ClientType::class, $client);
         $clientForm->handleRequest($request);
 
-        if ($clientForm->isValid()) {
-            $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
+        if ($clientForm->isSubmitted() && $clientForm->isValid()) {
+            $client->setAllowedGrantTypes(['client_credentials', 'token', 'authorization_code', 'password', 'refresh_token']);
             $em->persist($client);
             $em->flush();