Destroy team rpc when demoted to viewer

pull/1/head
yflory 2019-11-12 16:45:06 +01:00
parent a3bb56f3db
commit bfd46fb570
1 changed files with 4 additions and 0 deletions

View File

@ -1035,6 +1035,10 @@ define([
team.userObject.setReadOnly(!secret.keys.secondaryKey, secret.keys.secondaryKey);
}
if (!secret.keys.secondaryKey && team.rpc) {
team.rpc.destroy();
}
// Upgrade the shared folders
var folders = Util.find(team, ['proxy', 'drive', 'sharedFolders']);
Object.keys(folders || {}).forEach(function (sfId) {