R
R
Roman2020-06-14 12:42:25
1C-Bitrix
Roman, 2020-06-14 12:42:25

How to enable CRM rights check in DealTable::getList?

Good afternoon!

I display user's deals using Bitrix\Crm\DealTable::getList()

There was a problem - users see deals that they should not see.
I remember that in CCrmDealList the check of rights and roles was automatic.
Is there something similar in D7?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2020-06-15
@gromdron

You are misinterpreting the starting point.
DataMappers are the low-level layer between data and your code. There should not be any verification of rights and, accordingly, it is not there.
To obtain a list of transactions with rights and maintain backward compatibility, you must use the methods:

CCrmDeal::GetList($arOrder = Array('DATE_CREATE' => 'DESC'), $arFilter = Array(), $arSelect = Array(), $nPageTop = false)
CCrmDeal::GetListEx($arOrder = array(), $arFilter = array(), $arGroupBy = false, $arNavStartParams = false, $arSelectFields = array(), $arOptions = array())

There is no official new API (as they say D7) for CRM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question