You can try `checkPermission(session, articleEditDTO.getUserId())` or `checkPermission(session, articleEditDTO.getUserName())` .