richdocuments/lib/view.php

28 lines
541 B
PHP
Raw Normal View History

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{
public function getFilePermissions($path){
2013-09-23 22:56:27 +03:00
$permissions = 0;
if ($this->isReadable($path)) {
2013-09-23 22:56:27 +03:00
$permissions |= \OCP\PERMISSION_READ;
}
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
}