From 4558a717fa0075ea51be1d93fb73c5932ce446b6 Mon Sep 17 00:00:00 2001 From: Tower Date: Tue, 19 May 2026 21:55:14 +0200 Subject: [PATCH 1/3] new rightscontroller for new service creating --- WEBROOT/controller/RightsController.php | 87 +++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 WEBROOT/controller/RightsController.php diff --git a/WEBROOT/controller/RightsController.php b/WEBROOT/controller/RightsController.php new file mode 100644 index 0000000..7693612 --- /dev/null +++ b/WEBROOT/controller/RightsController.php @@ -0,0 +1,87 @@ +saveSite($sitename); + + DatabaseInsert( + "Benutzer_Berechtigungen", + "BENUTZER_ID, SEITEN_ID", + $this->getUserID($name, $lastname), + $this->getSiteID($sitename) + ); + } catch (Exception $error) { + return json_encode( + [ + "status" => "failed", + "error" => $error->getMessage() + ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE + ); + } + return json_encode( + [ + "status" => "success", + ], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE + ); + } +} \ No newline at end of file From 2231d65465ccee9e760c37b9dcdcab145d9f905c Mon Sep 17 00:00:00 2001 From: Tower Date: Tue, 19 May 2026 21:55:55 +0200 Subject: [PATCH 2/3] fixed user_rights control, when new service is created rights are setted for bruno --- WEBROOT/services/services_control.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WEBROOT/services/services_control.php b/WEBROOT/services/services_control.php index 5eb9507..1b3c90d 100644 --- a/WEBROOT/services/services_control.php +++ b/WEBROOT/services/services_control.php @@ -1,5 +1,8 @@ RightsHandler($s['name']); } $newServiceGroups = []; From 2901a5e362755bce477b3fe22ad9bad3db19d671 Mon Sep 17 00:00:00 2001 From: Bruno Eckhardt Date: Wed, 20 May 2026 12:31:20 +0200 Subject: [PATCH 3/3] add create and save new api token --- WEBROOT/controller/ApiController.php | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/WEBROOT/controller/ApiController.php b/WEBROOT/controller/ApiController.php index f11b9f3..2255b3d 100644 --- a/WEBROOT/controller/ApiController.php +++ b/WEBROOT/controller/ApiController.php @@ -1,5 +1,7 @@ createToken(), + "API-User" + ); + } catch (Exception $error) { + return false; + } + return true; + } } \ No newline at end of file