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 ea07a428f4
commit 9ee1f506f2
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);