|
|
@ -214,7 +214,7 @@ define([
|
|
|
|
if (!Env.folders[id]) { return {}; }
|
|
|
|
if (!Env.folders[id]) { return {}; }
|
|
|
|
var obj = Env.folders[id].proxy.metadata || {};
|
|
|
|
var obj = Env.folders[id].proxy.metadata || {};
|
|
|
|
for (var k in Env.user.proxy[UserObject.SHARED_FOLDERS][id] || {}) {
|
|
|
|
for (var k in Env.user.proxy[UserObject.SHARED_FOLDERS][id] || {}) {
|
|
|
|
var data = JSON.parse(JSON.stringify(Env.user.proxy[UserObject.SHARED_FOLDERS][id][k]));
|
|
|
|
var data = JSON.parse(JSON.stringify(Env.user.proxy[UserObject.SHARED_FOLDERS][id][k] || {}));
|
|
|
|
if (k === "href" && data.indexOf('#') === -1) {
|
|
|
|
if (k === "href" && data.indexOf('#') === -1) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
data = Env.user.userObject.cryptor.decrypt(data);
|
|
|
|
data = Env.user.userObject.cryptor.decrypt(data);
|
|
|
@ -503,6 +503,17 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (data.password) { folderData.password = data.password; }
|
|
|
|
if (data.password) { folderData.password = data.password; }
|
|
|
|
if (data.owned) { folderData.owners = [Env.edPublic]; }
|
|
|
|
if (data.owned) { folderData.owners = [Env.edPublic]; }
|
|
|
|
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
|
|
|
|
Env.Store.getPadMetadata(null, {
|
|
|
|
|
|
|
|
channel: folderData.channel
|
|
|
|
|
|
|
|
}, waitFor(function (obj) {
|
|
|
|
|
|
|
|
if (obj && (obj.error || obj.rejected)) {
|
|
|
|
|
|
|
|
waitFor.abort();
|
|
|
|
|
|
|
|
return void cb({
|
|
|
|
|
|
|
|
error: obj.error || 'ERESTRICTED'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}));
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
Env.pinPads([folderData.channel], waitFor());
|
|
|
|
Env.pinPads([folderData.channel], waitFor());
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|
}).nThen(function (waitFor) {
|
|
|
|