[FIX] Return room ID for groups where user joined (#11703)

pull/9715/merge
Tim Kinnane 7 years ago committed by Diego Sampaio
parent a5175e9f0f
commit 3c0841689b
  1. 2
      server/methods/getRoomIdByNameOrId.js

@ -17,7 +17,7 @@ Meteor.methods({
});
}
if (room.t !== 'c' || RocketChat.authz.hasPermission(Meteor.userId(), 'view-c-room') !== true) {
if (!RocketChat.authz.canAccessRoom(room, Meteor.user())) {
throw new Meteor.Error('error-not-allowed', 'Not allowed', {
method: 'getRoomIdByNameOrId'
});

Loading…
Cancel
Save