Classes/Domain/Model/Content.php 1 location
|
@@ 418-428 (lines=11) @@
|
| 415 |
|
* @return array |
| 416 |
|
* @throws \Exception |
| 417 |
|
*/ |
| 418 |
|
protected function filterForBackendUser($fields) |
| 419 |
|
{ |
| 420 |
|
if (!$this->getBackendUser()->isAdmin()) { |
| 421 |
|
foreach ($fields as $key => $fieldName) { |
| 422 |
|
if (Tca::table($this->dataType)->hasField($fieldName) && !Tca::table($this->dataType)->field($fieldName)->hasAccess()) { |
| 423 |
|
unset($fields[$key]); |
| 424 |
|
} |
| 425 |
|
} |
| 426 |
|
} |
| 427 |
|
return $fields; |
| 428 |
|
} |
| 429 |
|
|
| 430 |
|
/** |
| 431 |
|
* Remove fields according to Grid configuration. |
Classes/Tca/GridService.php 1 location
|
@@ 258-268 (lines=11) @@
|
| 255 |
|
* @return array |
| 256 |
|
* @throws \Exception |
| 257 |
|
*/ |
| 258 |
|
protected function filterByBackendUser($fields) |
| 259 |
|
{ |
| 260 |
|
if (!$this->getBackendUser()->isAdmin()) { |
| 261 |
|
foreach ($fields as $fieldName => $field) { |
| 262 |
|
if (Tca::table($this->tableName)->hasField($fieldName) && !Tca::table($this->tableName)->field($fieldName)->hasAccess()) { |
| 263 |
|
unset($fields[$fieldName]); |
| 264 |
|
} |
| 265 |
|
} |
| 266 |
|
} |
| 267 |
|
return $fields; |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
/** |
| 271 |
|
* Remove fields according to Grid configuration. |