mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 21:06:15 +02:00
Remove MASTER_DATA_READ
This commit is contained in:
parent
5875b57541
commit
bb3315de53
|
|
@ -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']));
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -54,9 +54,6 @@ msgstr ""
|
|||
msgid "MASTER_DATA_EDIT"
|
||||
msgstr ""
|
||||
|
||||
msgid "MASTER_DATA_READ"
|
||||
msgstr ""
|
||||
|
||||
msgid "TASKS_UNDO"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -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')),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user