Example #1
0
 private function assertTrustedResource(Resource $resource, RunConfiguration $runConfiguration, UserConfiguration $userConfiguration)
 {
     if ($resource instanceof LocalResource || $runConfiguration->isTrusted() || in_array($resource->getMetadata()->getOwner(), $userConfiguration->getTrustedUsers()) || in_array($resource->getSignature(), $userConfiguration->getTrustedSignatures())) {
         return;
     }
     throw new TrustException($resource);
 }