Auth & permissions

Basic info about Authorization here >>

Where is possible set permissions?

on all Buttons and DropDowns

$button->setTitle('Edit group')
    ->setType('primary');

$button->setAttribute('href', $button->link('/user/edit', ['id' => '{id}']));

// setPermission($resource, $privilege);
$button->setPermission('group', 'edit');

echo $button->render();

on all columns

extends from Mesour\DataGrid\Column\BaseColumn

/** @var Mesour\UI\DataGrid $grid */
$grid->addNumber('amount', 'Amount')
    ->setUnit('USD')
    ->setPermission('user-grid-column', 'amount');

on selected extensions

/** @var Mesour\UI\DataGrid $grid */
$extension = $grid->enableEditable();
$extension->setPermission('user-grid', 'editing');

on status items

See Mesour\DataGrid\Column\Status\IStatusItem

/** @var Mesour\UI\DataGrid $grid */
$statusColumn = $grid->addStatus('action', 'S');

$statusColumn->addButton('active')
    ->setStatus(1, 'Active', 'All active')
    ->setIcon('check-circle')
    ->setType('success')
    ->setPermission('column', 'amount') //! here set permission
    ->setAttribute('href', '#');

See Mesour\DataGrid\Extensions\Selection\Link

/** @var Mesour\UI\DataGrid $grid */
$selection = $grid->enableRowSelection();

$links = $selection->getLinks();

$links->addLink('Delete')
->setPermission('user-grid-selection', 'delete') //! here set permission
->onCall[] = function () {
    print_r(func_get_args());
};