我在jive的后台登录时,用户名密码都admin,admin,但是每次都提示错误。也就是forumFactory.hasPermission(ForumPermissions.SYSTEM_ADMIN)是false,但是他是怎么实现的呢?应该是用什么用户名呢?
if (ParamUtils.getBooleanParameter(request,"login")) {
try {
Authorization authToken = AuthorizationFactory.getAuthorization(username, password);
ForumFactory forumFactory = ForumFactory.getInstance(authToken);
if (!forumFactory.hasPermission(ForumPermissions.SYSTEM_ADMIN)) {
throw new UnauthorizedException();
}
session.setAttribute("jive.admin.authorization", authToken);
response.sendRedirect("index.jsp");
return;
}
catch (UnauthorizedException ue) {
errors = true;
errorMessage = "登录失败: 请确认你的用户名和口令都正确";
}
}