From bb3315de535b61c5a8efa9384619bd9b7de4f501 Mon Sep 17 00:00:00 2001 From: fipwmaqzufheoxq92ebc <29818044+fipwmaqzufheoxq92ebc@users.noreply.github.com> Date: Fri, 28 Aug 2020 15:42:14 +0200 Subject: [PATCH] Remove MASTER_DATA_READ --- controllers/GenericEntityApiController.php | 5 ----- controllers/Users/User.php | 1 - localization/permissions.pot | 3 --- migrations/0111.sql | 1 - 4 files changed, 10 deletions(-) diff --git a/controllers/GenericEntityApiController.php b/controllers/GenericEntityApiController.php index 72e8f3ac..28d7e8f6 100644 --- a/controllers/GenericEntityApiController.php +++ b/controllers/GenericEntityApiController.php @@ -13,8 +13,6 @@ class GenericEntityApiController extends BaseApiController public function GetObjects(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { - User::checkPermission($request, User::PERMISSION_MASTER_DATA_READ); - $objects = $this->getDatabase()->{$args['entity']}(); $allUserfields = $this->getUserfieldsService()->GetAllValues($args['entity']); @@ -45,7 +43,6 @@ class GenericEntityApiController extends BaseApiController public function GetObject(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { - User::checkPermission($request, User::PERMISSION_MASTER_DATA_READ); if ($this->IsValidEntity($args['entity']) && !$this->IsEntityWithPreventedListing($args['entity'])) { $userfields = $this->getUserfieldsService()->GetValues($args['entity'], $args['objectId']); @@ -152,7 +149,6 @@ class GenericEntityApiController extends BaseApiController public function SearchObjects(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { - User::checkPermission($request, User::PERMISSION_MASTER_DATA_READ); if ($this->IsValidEntity($args['entity']) && !$this->IsEntityWithPreventedListing($args['entity'])) { @@ -173,7 +169,6 @@ class GenericEntityApiController extends BaseApiController public function GetUserfields(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { - User::checkPermission($request, User::PERMISSION_MASTER_DATA_READ); try { return $this->ApiResponse($response, $this->getUserfieldsService()->GetValues($args['entity'], $args['objectId'])); diff --git a/controllers/Users/User.php b/controllers/Users/User.php index e3a69287..420b0043 100644 --- a/controllers/Users/User.php +++ b/controllers/Users/User.php @@ -21,7 +21,6 @@ class User const PERMISSION_UPLOAD_FILE = 'UPLOAD_FILE'; const PERMISSION_DELETE_FILE = 'DELETE_FILE'; const PERMISSION_MASTER_DATA_EDIT = 'MASTER_DATA_EDIT'; - const PERMISSION_MASTER_DATA_READ = 'MASTER_DATA_READ'; const PERMISSION_TASKS_UNDO = 'TASKS_UNDO'; const PERMISSION_TASKS_MARK_COMPLETED = 'TASKS_MARK_COMPLETED'; const PERMISSION_STOCK_TRANSFER = 'STOCK_TRANSFER'; diff --git a/localization/permissions.pot b/localization/permissions.pot index b4112d5e..1d265271 100644 --- a/localization/permissions.pot +++ b/localization/permissions.pot @@ -54,9 +54,6 @@ msgstr "" msgid "MASTER_DATA_EDIT" msgstr "" -msgid "MASTER_DATA_READ" -msgstr "" - msgid "TASKS_UNDO" msgstr "" diff --git a/migrations/0111.sql b/migrations/0111.sql index 0f732a9e..eadb57ef 100644 --- a/migrations/0111.sql +++ b/migrations/0111.sql @@ -86,7 +86,6 @@ VALUES ('DELETE_FILE', (SELECT id FROM permission_hierarchy WHERE name = 'ADMIN')), -- master data ('MASTER_DATA_EDIT', (SELECT id FROM permission_hierarchy WHERE name = 'ADMIN')), -('MASTER_DATA_READ', (SELECT id FROM permission_hierarchy WHERE name = 'ADMIN')), -- Tasks ('TASKS_UNDO', (SELECT id FROM permission_hierarchy WHERE name = 'ADMIN')), ('TASKS_MARK_COMPLETED', (SELECT id FROM permission_hierarchy WHERE name = 'ADMIN')),