|
|
@ -1364,15 +1364,15 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// Viewer to editor
|
|
|
|
// Viewer to editor
|
|
|
|
if (user.role === "VIEWER" && data.data.role !== "VIEWER") {
|
|
|
|
if (user.role === "VIEWER" && data.data.role !== "VIEWER") {
|
|
|
|
changeEditRights(ctx, teamId, user, true, function (err) {
|
|
|
|
changeEditRights(ctx, teamId, user, true, function (obj) {
|
|
|
|
return void cb({error: err});
|
|
|
|
return void cb(obj);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Editor to viewer
|
|
|
|
// Editor to viewer
|
|
|
|
if (user.role !== "VIEWER" && data.data.role === "VIEWER") {
|
|
|
|
if (user.role !== "VIEWER" && data.data.role === "VIEWER") {
|
|
|
|
changeEditRights(ctx, teamId, user, false, function (err) {
|
|
|
|
changeEditRights(ctx, teamId, user, false, function (obj) {
|
|
|
|
return void cb({error: err});
|
|
|
|
return void cb(obj);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|