diff --git a/Admin/Install/Application/Shop/Application.php b/Admin/Install/Application/Shop/Application.php index 497e695..5e06421 100644 --- a/Admin/Install/Application/Shop/Application.php +++ b/Admin/Install/Application/Shop/Application.php @@ -24,6 +24,7 @@ use Modules\Profile\Models\ProfileMapper; use phpOMS\Account\Account; use phpOMS\Account\AccountManager; use phpOMS\Account\NullAccount; +use phpOMS\Account\PermissionType; use phpOMS\Asset\AssetType; use phpOMS\Auth\Auth; use phpOMS\DataStorage\Cache\CachePool; @@ -212,16 +213,11 @@ final class Application } /* No reading permission */ - /** todo: fix by checking for special permission like read, orgid, appname, ...., component = login must be set - * the current solution is bad because if a user has read, orgid, appname he can read everything so you don't - * want to give this to users. if i don't understand what this means at a later stage... just trust me future me. - * create a permission e.g. 1, Shop, ...., 1 which will be the login permission and check it below. - */ - /*if (!$account->hasPermission(PermissionType::READ, $this->app->orgId, $this->app->appName)) { + if (!$account->hasPermission(PermissionType::READ, $this->app->orgId, $this->app->appName, 'Dashboard')) { $this->create403Response($response, $pageView); return; - }*/ + } $this->app->moduleManager->initRequestModules($request); $this->createDefaultPageView($request, $response, $pageView);