The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/server/services/authorization/canAccessRoomTokenpass.ts

14 lines
557 B

import { IAuthorizationTokenpass } from '../../sdk/types/IAuthorizationTokenpass';
import { proxifyWithWait } from '../../sdk/lib/proxify';
import { RoomAccessValidator } from '../../sdk/types/IAuthorization';
export const AuthorizationTokenpass = proxifyWithWait<IAuthorizationTokenpass>('authorization-tokenpass');
export const canAccessRoomTokenpass: RoomAccessValidator = async (room, user): Promise<boolean> => {
if (!room?.tokenpass) {
return false;
}
// Call back core temporarily
return AuthorizationTokenpass.canAccessRoom(room, user);
};