diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 917d017..f476700 100755 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -1,6 +1,6 @@ execute(new Setting(0, SettingsEnum::DEFAULT_ORGANIZATION, '1', '\\d+')); SettingMapper::create()->execute(new Setting(0, SettingsEnum::LOGIN_STATUS, '1', '[0-3]')); SettingMapper::create()->execute(new Setting(0, SettingsEnum::DEFAULT_LOCALIZATION, '1', '\\d+')); - SettingMapper::create()->execute(new Setting(0, SettingsEnum::MAIL_SERVER_ADDR, 'admin@orange-management.email', "(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])", module: 'Admin')); + SettingMapper::create()->execute(new Setting(0, SettingsEnum::MAIL_SERVER_ADDR, 'admin@karaka.email', "(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])", module: 'Admin')); SettingMapper::create()->execute(new Setting(0, SettingsEnum::MAIL_SERVER_TYPE, SubmitType::MAIL, module: 'Admin')); SettingMapper::create()->execute(new Setting(0, SettingsEnum::MAIL_SERVER_USER, '', module: 'Admin')); SettingMapper::create()->execute(new Setting(0, SettingsEnum::MAIL_SERVER_PASS, '', module: 'Admin')); diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index a7a5089..5d573d7 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -1,6 +1,6 @@ setFrom($emailSettings[SettingsEnum::MAIL_SERVER_ADDR], 'Orange-Management'); $mail->addTo($account->email, \trim($account->name1 . ' ' . $account->name2 . ' ' . $account->name3)); - $mail->subject = 'Orange Management: Forgot Password'; + $mail->subject = 'Karaka: Forgot Password'; $mail->body = ''; $mail->msgHTML('Please reset your password at: ' . $resetLink . ''); @@ -333,7 +333,7 @@ final class ApiController extends Controller $mail = new Email(); $mail->setFrom($emailSettings[SettingsEnum::MAIL_SERVER_ADDR], 'Orange-Management'); $mail->addTo($account->email, \trim($account->name1 . ' ' . $account->name2 . ' ' . $account->name3)); - $mail->subject = 'Orange Management: Password reset'; + $mail->subject = 'Karaka: Password reset'; $mail->body = ''; $mail->msgHTML('Your new password: ' . $pass . '' . "\n\n" diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6dc9e13..591dd1b 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -1,6 +1,6 @@ with('groups')->with('l11n')->where('id', $id)->execute(); + $account = self::get()->with('groups')->with('groups/permissions')->with('l11n')->where('id', $id)->execute(); $groups = \array_keys($account->getGroups()); $groupPermissions = empty($groups) diff --git a/Models/AccountPermission.php b/Models/AccountPermission.php index e6b5074..1116d3e 100755 --- a/Models/AccountPermission.php +++ b/Models/AccountPermission.php @@ -1,6 +1,6 @@ 'account_group_account', 'self' => 'account_group_group', ], + 'permissions' => [ + 'mapper' => GroupPermissionMapper::class, + 'table' => 'group_permission', + 'external' => null, + 'self' => 'group_permission_group', + ], ]; /** diff --git a/Models/GroupPermission.php b/Models/GroupPermission.php index 775b368..cc4d9d7 100755 --- a/Models/GroupPermission.php +++ b/Models/GroupPermission.php @@ -1,6 +1,6 @@ header->account = 1; $request->setData('id', 1); - $request->setData('email', 'oms@orange-management.de'); + $request->setData('email', 'oms@karaka.de'); $request->setData('password', 'orange'); $this->module->apiAccountUpdate($request, $response); $this->module->apiAccountGet($request, $response); - self::assertEquals('oms@orange-management.de', $response->get('')['response']->getEmail()); + self::assertEquals('oms@karaka.de', $response->get('')['response']->getEmail()); self::assertGreaterThan(0, $response->get('')['response']->getId()); } diff --git a/tests/Controller/Api/ApiControllerApplicationTrait.php b/tests/Controller/Api/ApiControllerApplicationTrait.php index bc00500..da6f183 100755 --- a/tests/Controller/Api/ApiControllerApplicationTrait.php +++ b/tests/Controller/Api/ApiControllerApplicationTrait.php @@ -1,6 +1,6 @@