Fix race condition with team access rights #497

This commit is contained in:
yflory
2020-02-18 17:04:44 +01:00
parent d9ab8d3f62
commit f04a6056ae
2 changed files with 23 additions and 10 deletions

View File

@@ -494,10 +494,11 @@ define([
try {
var module = ctx.store.modules['team'];
// changeMyRights returns true if we can't change our rights
module.changeMyRights(teamId, content.state, content.teamData);
module.changeMyRights(teamId, content.state, content.teamData, function (done) {
if (!done) { console.error("Can't update team rights"); }
cb(true);
});
} catch (e) { console.error(e); }
cb(true);
};
handlers['OWNED_PAD_REMOVED'] = function (ctx, box, data, cb) {