2013-08-07 21:14:36 +03:00
|
|
|
<?php
|
2013-08-08 00:22:21 +03:00
|
|
|
/**
|
2013-08-28 12:02:27 +02:00
|
|
|
* ownCloud - Documents App
|
2013-08-08 00:22:21 +03:00
|
|
|
*
|
|
|
|
* @author Victor Dubiniuk
|
|
|
|
* @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
*/
|
2013-08-07 21:14:36 +03:00
|
|
|
|
2013-08-28 12:02:27 +02:00
|
|
|
namespace OCA\Documents;
|
2013-08-07 21:14:36 +03:00
|
|
|
|
|
|
|
class View extends \OC\Files\View{
|
|
|
|
|
2013-09-24 03:39:05 +03:00
|
|
|
public function getFilePermissions($path){
|
2013-09-23 22:56:27 +03:00
|
|
|
$permissions = 0;
|
2013-09-24 03:39:05 +03:00
|
|
|
if ($this->isReadable($path)) {
|
2013-09-23 22:56:27 +03:00
|
|
|
$permissions |= \OCP\PERMISSION_READ;
|
|
|
|
}
|
2013-09-24 03:39:05 +03:00
|
|
|
if ($this->isSharable($path)) {
|
2013-09-23 22:56:27 +03:00
|
|
|
$permissions |= \OCP\PERMISSION_SHARE;
|
|
|
|
}
|
|
|
|
return $permissions;
|
|
|
|
}
|
2013-08-08 00:08:20 +03:00
|
|
|
|
2013-08-07 21:14:36 +03:00
|
|
|
}
|