|
|
@@ -418,7 +418,16 @@ class Route_ViewTableAjax extends RouteBase {
|
|
|
$tbl = $this->getTableAjaxWidget($acl);
|
|
|
|
|
|
$record = $acl->buildQuery([])->getItem($id);
|
|
|
- if (!$acl->canWriteRecord($record) && !$acl->hasPermSuperWrite()) throw new Exception("Brak dostępu do rekordu");
|
|
|
+ if (!$acl->canWriteRecord($record) && !$acl->hasPermSuperWrite()) {
|
|
|
+ return [
|
|
|
+ 'type' => "success",
|
|
|
+ 'msg' => "Edycja rekordu nr {$id}",
|
|
|
+ 'body' => [
|
|
|
+ 'reactNode' => [ 'div', [ 'class' => "alert alert-danger" ], "Brak dostępu do rekordu" ]
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ // throw new Exception("Brak dostępu do rekordu");
|
|
|
+ }
|
|
|
$fieldsList = array();
|
|
|
foreach ($acl->getFieldListByIdZasob() as $kID => $fieldName) {
|
|
|
if ($fieldName == 'ID') continue;
|