authorized() 공개 메소드

Check if you can do something with the given file or directory.
public authorized ( string $prefix, string $path ) : boolean
$prefix string
$path string
리턴 boolean
예제 #1
0
 public function testBasicAuth()
 {
     $app = $this->getApp();
     $fp = new FilePermissions($app);
     $this->assertTrue($fp->authorized('config', 'test.yml'));
     $this->assertFalse($fp->authorized('something', '/path/to/.htaccess'));
 }
예제 #2
0
파일: Authorized.php 프로젝트: bolt/bolt
 /**
  * Returns whether you are authorized to do something with a file or directory.
  *
  * @param string $path
  *
  * @return bool
  */
 public function handle($path)
 {
     $file = $this->filesystem->getFile($path);
     return $this->filePermissions->authorized($file->getMountPoint(), $file->getPath());
 }