Make sure users can't block themselves with SF allow list

This commit is contained in:
yflory
2020-03-09 12:12:29 +01:00
parent 835f531c9e
commit d73b32a05e
3 changed files with 21 additions and 0 deletions

View File

@@ -67,6 +67,13 @@ define([
}
};
var restrictedProxy = function (Env, id, channel) {
var lm = { proxy: { deprecated: true } };
removeProxy(Env, id);
addProxy(Env, id, lm, function () {});
return void Env.Store.refreshDriveUI();
};
/*
Tools
*/
@@ -1118,6 +1125,7 @@ define([
addProxy: callWithEnv(addProxy),
removeProxy: callWithEnv(removeProxy),
deprecateProxy: callWithEnv(deprecateProxy),
restrictedProxy: callWithEnv(restrictedProxy),
addSharedFolder: callWithEnv(_addSharedFolder),
// Drive
command: callWithEnv(onCommand),