Gives you access to a module for managing permissions.
enum PermissionTypes {
broadcast = 'broadcast',
manageBroadcast = 'manage_broadcast',
endSession = 'end_session',
startSession = 'start_session',
removeParticipant = 'remove_participant',
screenshare = 'screenshare',
manageScreenshare = 'manage_screenshare',
recording = 'recording',
generalChat = 'general_chat',
remoteMuting = 'remote_muting',
askRemoteUnmute = 'ask_remote_unmute',
raiseHand = 'raise_hand',
manageRoles = 'manage_roles',
}
HasPermissionsOptions {
targetRole?: string;
role?: string;
userId?: UserId;
}
const canBroadcast = sambaFrame.permissionManager.hasPermissions('broadcast');
console.log('Local user can broadcast:', canBroadcast);