Disallow accessing FirstTimeSetupOptionsForm once first time setup is completed
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 6 Mar 2023 13:52:56 +0000 (14:52 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 17 Apr 2023 16:45:09 +0000 (18:45 +0200)
wcfsetup/install/files/lib/acp/form/FirstTimeSetupOptionsForm.class.php

index 8783463a38fb9e9f33a43727a5c295bd15ea4d4c..0beab982d5c38d2e82978e4b334a1936b6df8805 100644 (file)
@@ -4,6 +4,7 @@ namespace wcf\acp\form;
 
 use wcf\data\option\Option;
 use wcf\data\option\OptionAction;
+use wcf\system\exception\PermissionDeniedException;
 use wcf\system\option\OptionHandler;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
@@ -49,6 +50,18 @@ final class FirstTimeSetupOptionsForm extends AbstractOptionListForm
         'package_server_auth_code',
     ];
 
+    /**
+     * @inheritDoc
+     */
+    public function readParameters()
+    {
+        parent::readParameters();
+
+        if (\FIRST_TIME_SETUP_STATE == -1) {
+            throw new PermissionDeniedException();
+        }
+    }
+
     /**
      * @inheritDoc
      */