|
@@ 745-753 (lines=9) @@
|
| 742 |
|
/** @var File $file */ |
| 743 |
|
$file = $this->getList()->byID($id); |
| 744 |
|
|
| 745 |
|
if (!$file->canView()) { |
| 746 |
|
$this->httpError(403, _t( |
| 747 |
|
'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
| 748 |
|
'You don\'t have the necessary permissions to modify {ObjectTitle}', |
| 749 |
|
'', |
| 750 |
|
['ObjectTitle' => $file->i18n_singular_name()] |
| 751 |
|
)); |
| 752 |
|
return null; |
| 753 |
|
} |
| 754 |
|
|
| 755 |
|
$scaffolder = $this->getFormFactory($file); |
| 756 |
|
$form = $scaffolder->getForm($this, 'FileEditForm', [ |
|
@@ 793-801 (lines=9) @@
|
| 790 |
|
|
| 791 |
|
$request = $this->getRequest(); |
| 792 |
|
|
| 793 |
|
if (!$file->canView()) { |
| 794 |
|
$this->httpError(403, _t( |
| 795 |
|
'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
| 796 |
|
'You don\'t have the necessary permissions to modify {ObjectTitle}', |
| 797 |
|
'', |
| 798 |
|
['ObjectTitle' => $file->i18n_singular_name()] |
| 799 |
|
)); |
| 800 |
|
return null; |
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
$versionId = $request->param('OtherItemID'); |
| 804 |
|
$version = Versioned::get_version($this->getList()->dataClass(), $id, $versionId); |
|
@@ 1141-1149 (lines=9) @@
|
| 1138 |
|
)); |
| 1139 |
|
return null; |
| 1140 |
|
} |
| 1141 |
|
if (!$record->canView()) { |
| 1142 |
|
$this->httpError(403, _t( |
| 1143 |
|
'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
| 1144 |
|
'You don\'t have the necessary permissions to modify {ObjectTitle}', |
| 1145 |
|
'', |
| 1146 |
|
['ObjectTitle' => $record->i18n_singular_name()] |
| 1147 |
|
)); |
| 1148 |
|
return null; |
| 1149 |
|
} |
| 1150 |
|
|
| 1151 |
|
$handler = AddToCampaignHandler::create($this, $record); |
| 1152 |
|
$form = $handler->Form($record); |