Return remote shares in oc:share-types Webdav property

Fixes web UI to properly display the share status icon when an outgoing
remote share exists
This commit is contained in:
Vincent Petry 2016-03-24 12:16:57 +01:00
parent af7c34d9a6
commit 1f4738c372
4 changed files with 8 additions and 2 deletions

View File

@ -116,7 +116,8 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
$requestedShareTypes = [
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK
\OCP\Share::SHARE_TYPE_LINK,
\OCP\Share::SHARE_TYPE_REMOTE
];
foreach ($requestedShareTypes as $requestedShareType) {
// one of each type is enough to find out about the types

View File

@ -248,10 +248,12 @@ class SharesPlugin extends \Test\TestCase {
[[\OCP\Share::SHARE_TYPE_USER]],
[[\OCP\Share::SHARE_TYPE_GROUP]],
[[\OCP\Share::SHARE_TYPE_LINK]],
[[\OCP\Share::SHARE_TYPE_REMOTE]],
[[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP]],
[[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK]],
[[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_LINK]],
[[\OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK]],
[[\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_REMOTE]],
];
}
}

View File

@ -177,7 +177,8 @@ class ApiController extends Controller {
$requestedShareTypes = [
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK
\OCP\Share::SHARE_TYPE_LINK,
\OCP\Share::SHARE_TYPE_REMOTE
];
foreach ($requestedShareTypes as $requestedShareType) {
// one of each type is enough to find out about the types

View File

@ -123,6 +123,8 @@
hasShares = true;
} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {
hasShares = true;
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
hasShares = true;
}
});
OCA.Sharing.Util._updateFileActionIcon($tr, hasShares, hasLink);