Skip to content

Commit

Permalink
[bug] Fix exception with undefined permissions in config
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Mar 18, 2024
1 parent 0dd2301 commit cf9db25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DocService/sources/DocsCoServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,7 @@ exports.install = function(server, callbackFunction) {
const curUserId = curUserIdOriginal + curIndexUser;
conn.tenant = tenantManager.getTenantByConnection(ctx, conn);
conn.docId = data.docid;
conn.permissions = data.permissions;
conn.permissions = data.permissions || {};
conn.user = {
id: curUserId,
idOriginal: curUserIdOriginal,
Expand Down Expand Up @@ -2988,7 +2988,7 @@ exports.install = function(server, callbackFunction) {
}

function* onMessage(ctx, conn, data) {
if (false === conn.permissions.chat) {
if (false === conn.permissions?.chat) {
ctx.logger.warn("insert message permissions.chat==false");
return;
}
Expand Down

0 comments on commit cf9db25

Please sign in to comment.