feat: Security
This commit is contained in:
@@ -119,7 +119,6 @@ export class RoomSettingsEffects {
|
||||
|
||||
if (canManageRoom) {
|
||||
this.serverDirectory.updateServer(room.id, {
|
||||
currentOwnerId: currentUser.id,
|
||||
actingRole: currentUserRole ?? undefined,
|
||||
name: updatedSettings.name,
|
||||
description: updatedSettings.description,
|
||||
@@ -175,7 +174,6 @@ export class RoomSettingsEffects {
|
||||
});
|
||||
|
||||
this.serverDirectory.updateServer(currentRoom.id, {
|
||||
currentOwnerId: currentUser.id,
|
||||
actingRole: role ?? undefined,
|
||||
channels
|
||||
}, {
|
||||
@@ -286,7 +284,6 @@ export class RoomSettingsEffects {
|
||||
});
|
||||
|
||||
this.serverDirectory.updateServer(room.id, {
|
||||
currentOwnerId: currentUser.id,
|
||||
roles: nextRoom.roles,
|
||||
roleAssignments: nextRoom.roleAssignments,
|
||||
channelPermissions: nextRoom.channelPermissions,
|
||||
@@ -355,7 +352,6 @@ export class RoomSettingsEffects {
|
||||
});
|
||||
|
||||
this.serverDirectory.updateServer(room.id, {
|
||||
currentOwnerId: currentUser.id,
|
||||
actingRole: isOwner ? 'host' : undefined,
|
||||
icon,
|
||||
iconUpdatedAt
|
||||
|
||||
@@ -54,6 +54,7 @@ import {
|
||||
getPersistedCurrentUserId
|
||||
} from './rooms.helpers';
|
||||
import type { RoomPresenceSignalingMessage } from './rooms.helpers';
|
||||
import { SESSION_EXPIRED_ERROR_CODE } from '../../domains/authentication/domain/logic/auth-session.rules';
|
||||
|
||||
const SERVER_ICON_SYNC_REQUEST_DELAYS_MS = [
|
||||
1_500,
|
||||
@@ -319,6 +320,10 @@ export class RoomStateSyncEffects {
|
||||
);
|
||||
}
|
||||
|
||||
case 'auth_required':
|
||||
case 'auth_error':
|
||||
return of(UsersActions.loadCurrentUserFailure({ error: SESSION_EXPIRED_ERROR_CODE }));
|
||||
|
||||
default:
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
@@ -753,7 +753,6 @@ export class RoomsEffects {
|
||||
});
|
||||
|
||||
this.serverDirectory.updateServer(roomId, {
|
||||
currentOwnerId: currentUser.id,
|
||||
actingRole: 'host',
|
||||
ownerId: nextHostId,
|
||||
ownerPublicKey: nextHostOderId
|
||||
|
||||
Reference in New Issue
Block a user