ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilFileServicesPreProcessor.php
Go to the documentation of this file.
1<?php
2
23
30{
31 public function __construct(
32 private ilFileServicesSettings $settings,
33 string $reason = 'Extension is blacklisted.'
34 ) {
35 parent::__construct($this->settings->getBlackListedSuffixes(), $reason);
36 }
37
38 #[\Override]
39 public function process(FileStream $stream, Metadata $metadata): ProcessingStatus
40 {
41 if ($this->settings->isByPassAllowedForCurrentUser()) {
42 return new ProcessingStatus(ProcessingStatus::OK, 'Blacklist override by RBAC');
43 }
44 return parent::process($stream, $metadata);
45 }
46}
__construct(private ilFileServicesSettings $settings, string $reason='Extension is blacklisted.')
process(FileStream $stream, Metadata $metadata)
This method gets invoked by the file upload service to process the file with the help of the processo...
The base interface for all filesystem streams.
Definition: FileStream.php:32
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc