Updated code
This commit is contained in:
@@ -139,14 +139,6 @@ public class Validator {
|
||||
Map<String, Object> userInfo= tokenProvider.getUserInfoAndUserIdFromToken(request);
|
||||
return Long.parseLong(userInfo.get("userId").toString());
|
||||
}
|
||||
public UserEntity validatePreInstructor(HttpServletRequest request, Long userId) {
|
||||
UserEntity user = validateUser(request);
|
||||
if(Boolean.FALSE.equals(RoleStatusEnum.ROLE_PRE_INSTRUCTOR.getValue().equals(user.getRoleEntity().getRoleType()))||Boolean.FALSE.equals(user.getId().equals(userId))) {
|
||||
throw new ForbiddenAccessException(Status.FORBIDDEN, Translator.toLocale(GepafinConstant.PERMISSION_DENIED));
|
||||
}
|
||||
return userService.validateUser(userId);
|
||||
}
|
||||
|
||||
public CallEntity validateUserWithCall(UserEntity user, Long callId) {
|
||||
CallEntity callEntity = callService.validateCall(callId);
|
||||
if(Boolean.FALSE.equals(user.getHub().getId().equals(callEntity.getHub().getId()))) {
|
||||
|
||||
Reference in New Issue
Block a user