新增APP管理员进入密码房
This commit is contained in:
parent
77d9d1e249
commit
9ee1215195
@ -27,6 +27,7 @@ import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManager
|
|||||||
import com.red.circle.other.infra.database.mongo.service.live.RoomTouristService;
|
import com.red.circle.other.infra.database.mongo.service.live.RoomTouristService;
|
||||||
import com.red.circle.other.infra.database.mongo.service.live.RoomUserBlacklistService;
|
import com.red.circle.other.infra.database.mongo.service.live.RoomUserBlacklistService;
|
||||||
import com.red.circle.other.infra.database.rds.service.props.PropsRoomLockService;
|
import com.red.circle.other.infra.database.rds.service.props.PropsRoomLockService;
|
||||||
|
import com.red.circle.other.infra.database.rds.service.sys.AdministratorAuthService;
|
||||||
import com.red.circle.other.infra.database.rds.service.sys.AdministratorService;
|
import com.red.circle.other.infra.database.rds.service.sys.AdministratorService;
|
||||||
import com.red.circle.other.inner.asserts.RoomErrorCode;
|
import com.red.circle.other.inner.asserts.RoomErrorCode;
|
||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
@ -81,6 +82,7 @@ public class RoomEnterCmdExe {
|
|||||||
private final TrtcClient trtcClient;
|
private final TrtcClient trtcClient;
|
||||||
private final UserAgoraTokenCacheService userAgoraTokenCacheService;
|
private final UserAgoraTokenCacheService userAgoraTokenCacheService;
|
||||||
private final TaskMqMessage taskMqMessage;
|
private final TaskMqMessage taskMqMessage;
|
||||||
|
private final AdministratorAuthService administratorAuthService;
|
||||||
|
|
||||||
public EntryRoomResponseCO execute(RoomEntryCmd cmd) {
|
public EntryRoomResponseCO execute(RoomEntryCmd cmd) {
|
||||||
//checkEntryUserId(cmd);
|
//checkEntryUserId(cmd);
|
||||||
@ -272,7 +274,13 @@ public class RoomEnterCmdExe {
|
|||||||
Objects.equals(manager.getEvent(), RoomEventEnum.CLOSE.name()));
|
Objects.equals(manager.getEvent(), RoomEventEnum.CLOSE.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd.reqIsSelf(manager.getUserId()) || appAdmin) {
|
if (cmd.reqIsSelf(manager.getUserId())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// APP管理员可以进入密码房
|
||||||
|
List<String> authResources = administratorAuthService.listAuthResources(cmd.getReqUserId());
|
||||||
|
if (authResources.contains("ROOM_PASSWORD")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,17 +294,6 @@ public class RoomEnterCmdExe {
|
|||||||
ResponseAssert.isTrue(RoomErrorCode.PASSWORD_NOT_TRUE,
|
ResponseAssert.isTrue(RoomErrorCode.PASSWORD_NOT_TRUE,
|
||||||
Objects.equals(setting.getPassword(), cmd.getPwd()));
|
Objects.equals(setting.getPassword(), cmd.getPwd()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 2023/12/7 刘占洋需求: 2fun不严重区域冲突
|
|
||||||
// if (Objects.equals(cmd.requireReqSysOriginEnum(), SysOriginPlatformEnum.TWO_FUN)) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (Objects.equals(cmd.requireReqSysOriginEnum(), SysOriginPlatformEnum.TARAB)) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// 区域不互通
|
|
||||||
// ResponseAssert.isTrue(RoomErrorCode.NO_RIGHT_TO_ENTER, userRegionGateway.checkBusinessRegion(cmd.getReqUserId(), manager.getUserId()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user