Ejemplo n.º 1
0
 /**
  * The slot for the signal in ResourceFactory where storage objects are created
  *
  * @param ResourceFactory $resourceFactory
  * @param ResourceStorage $storage
  * @return void
  */
 public function addUserPermissionsToStorage(ResourceFactory $resourceFactory, ResourceStorage $storage)
 {
     if (!$this->backendUserAuthentication->isAdmin()) {
         $storage->setEvaluatePermissions(true);
         if ($storage->getUid() > 0) {
             $storage->setUserPermissions($this->backendUserAuthentication->getFilePermissionsForStorage($storage));
         } else {
             $storage->setEvaluatePermissions(false);
         }
         $this->addFileMountsToStorage($storage);
     }
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function getEvaluatePermissionsWhenSetTrue()
 {
     $this->prepareSubject(array());
     $this->subject->setEvaluatePermissions(true);
     $this->assertTrue($this->subject->getEvaluatePermissions());
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function getEvaluatePermissionsWhenSetTrue()
 {
     $this->prepareFixture(array());
     $this->fixture->setEvaluatePermissions(TRUE);
     $this->assertTrue($this->fixture->getEvaluatePermissions());
 }