diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 676afa3..02bc106 100644 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -66,7 +66,6 @@ return [ ], ], - // todo: the order of find and account is bad but needed for now. otherwise the admin/account.* also matches and we match two routes = bad '^.*/admin/find/account.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAccountFind', diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 92c2dfe..f65e338 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -56,6 +56,9 @@ use phpOMS\Version\Version; * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Modules#172 + * Add user & group settings */ final class ApiController extends Controller { @@ -1053,6 +1056,9 @@ final class ApiController extends Controller * * @api * + * @todo Orange-Management/Moduels#64 + * Create update functionality + * * @since 1.0.0 */ public function apiCheckForUpdates(RequestAbstract $request, ResponseAbstract $response, $data = null) : void diff --git a/Models/Module.php b/Models/Module.php index 9cbdda0..f83c652 100644 --- a/Models/Module.php +++ b/Models/Module.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Modules\Admin\Models; use phpOMS\Module\ModuleStatus; +use phpOMS\Stdlib\Base\Exception\InvalidEnumValue; /** * Module class. @@ -175,7 +176,10 @@ class Module */ public function setStatus(int $status) : void { - // todo: check valid + if (!ModuleStatusUpdateType::isValidValue($status)) { + throw new InvalidEnumValue($status); + } + $this->status = $status; } diff --git a/Theme/Backend/accounts-single.tpl.php b/Theme/Backend/accounts-single.tpl.php index 04ac13f..e016463 100644 --- a/Theme/Backend/accounts-single.tpl.php +++ b/Theme/Backend/accounts-single.tpl.php @@ -12,11 +12,25 @@ */ declare(strict_types=1); - use phpOMS\Account\AccountStatus; use phpOMS\Account\AccountType; use phpOMS\Account\PermissionType; +/** + * @todo Orange-Management/Modules#122 + * Add group account removal + * In front of every account there should be a red x which allows to remove an account from the group. + * + * @todo Orange-Management/Modules#127 + * Add account group removal + * Add red x in front of every group which removes the group for this account. + * + * @todo Orange-Management/Modules#126 + * Add account log tab + * Add auditing log tab to accounts for whenever something changes for an account. + * This tab should show everything this user is doing and all places where he is mentioned. + */ + /** * @var \phpOMS\Views\View $this */ diff --git a/Theme/Backend/groups-single.tpl.php b/Theme/Backend/groups-single.tpl.php index 6ec69d9..0351025 100644 --- a/Theme/Backend/groups-single.tpl.php +++ b/Theme/Backend/groups-single.tpl.php @@ -12,6 +12,31 @@ */ declare(strict_types=1); +/** + * @todo Orange-Management/Modules#122 + * Add group account removal + * In front of every account there should be a red x which allows to remove an account from the group. + * + * @todo Orange-Management/Modules#127 + * Add account group removal + * Add red x in front of every group which removes the group for this account. + * + * @todo Orange-Management/Modules#124 + * Add group permission removal + * Add a red x in front of every permission which removes the permission from the group. + * + * @todo Orange-Management/Modules#123 + * Add group permission adjustment + * In front of every permission there should be a cogs sign for modifying permissions. + * Clicking on it will put the info into the form below and change the button from add to update. + * At the same time there should be a clear button which allows to clear all these info and show the add button again. + * Alternatively the modification could be done inline in the permission list. + * + * @todo Orange-Management/Modules#125 + * Add group log tab for audits + * A new tab should be added where all changes can be audited if required. + * This tab should also show all the places where the group is mentioned. + */ /** * @var \phpOMS\Views\View $this