@@ 715-723 (lines=9) @@ | ||
712 | return null; |
|
713 | } |
|
714 | ||
715 | if (!$file->canView()) { |
|
716 | $this->httpError(403, _t( |
|
717 | 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
|
718 | 'You don\'t have the necessary permissions to modify {ObjectTitle}', |
|
719 | '', |
|
720 | ['ObjectTitle' => $file->i18n_singular_name()] |
|
721 | )); |
|
722 | return null; |
|
723 | } |
|
724 | ||
725 | // Pass to form factory |
|
726 | $augmentedContext = array_merge($context, ['Record' => $file]); |
|
@@ 792-800 (lines=9) @@ | ||
789 | return $this->httpError(404); |
|
790 | } |
|
791 | ||
792 | if (!$file->canView()) { |
|
793 | $this->httpError(403, _t( |
|
794 | 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
|
795 | 'You don\'t have the necessary permissions to modify {ObjectTitle}', |
|
796 | '', |
|
797 | ['ObjectTitle' => $file->i18n_singular_name()] |
|
798 | )); |
|
799 | return null; |
|
800 | } |
|
801 | ||
802 | $effectiveContext = array_merge($context, ['Record' => $file]); |
|
803 | /** @var FormFactory $scaffolder */ |
|
@@ 1159-1167 (lines=9) @@ | ||
1156 | )); |
|
1157 | return null; |
|
1158 | } |
|
1159 | if (!$record->canView()) { |
|
1160 | $this->httpError(403, _t( |
|
1161 | 'SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.ErrorItemPermissionDenied', |
|
1162 | 'You don\'t have the necessary permissions to modify {ObjectTitle}', |
|
1163 | '', |
|
1164 | ['ObjectTitle' => $record->i18n_singular_name()] |
|
1165 | )); |
|
1166 | return null; |
|
1167 | } |
|
1168 | ||
1169 | $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm'); |
|
1170 | $form = $handler->Form($record); |