Provide the secondaryKey to userObject

This commit is contained in:
yflory
2019-10-07 14:35:11 +02:00
parent dd2f0bd417
commit cf0d0e8e4b
11 changed files with 62 additions and 46 deletions

View File

@@ -215,6 +215,11 @@ define([
cb(id, rt);
});
};
var teamData = ctx.store.proxy.teams[team.id];
var secret;
if (teamData) {
secret = Hash.getSecrets('team', teamData.hash, teamData.password);
}
var manager = team.manager = ProxyManager.create(proxy.drive, {
onSync: function (cb) { ctx.Store.onSync(id, cb); },
edPublic: keys.drive.edPublic,
@@ -223,7 +228,8 @@ define([
loadSharedFolder: loadSharedFolder,
settings: {
drive: Util.find(ctx.store, ['proxy', 'settings', 'drive'])
}
},
editKey: secret && secret.keys.secondaryKey
}, {
outer: true,
removeOwnedChannel: function (channel, cb) {