Skip to content
Snippets Groups Projects
Commit 4c7082bf authored by Björn Schießle's avatar Björn Schießle
Browse files

allow to share a file/folder as public link also if one of it parents was already shared as link

parent 4c964cbb
Branches
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ OC.Share={
var path = dir;
// Search for possible parent folders that are shared
while (path != last) {
if (path == data['path']) {
if (path == data['path'] && !data['link']) {
var actions = $('.fileactions .action[data-action="Share"]');
$.each(actions, function(index, action) {
var img = $(action).find('img');
......@@ -244,7 +244,9 @@ OC.Share={
if (data.shares) {
$.each(data.shares, function(index, share) {
if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
if ( !('file_target' in share) ) {
OC.Share.showLink(share.token, share.share_with, itemSource);
}
} else {
if (share.collection) {
OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.mail_send, share.collection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment