Merge branch 'master' of https://github.com/codelibs/fess
This commit is contained in:
commit
fcd6d91d66
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
package jp.sf.fess.filter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import jp.sf.fess.entity.LoginInfo;
|
||||
|
||||
|
@ -11,8 +12,11 @@ import org.codelibs.sastruts.core.filter.AuthFilter;
|
|||
public class AdminAuthFilter extends AuthFilter {
|
||||
@Override
|
||||
protected UserInfo getUserInfo(final HttpServletRequest req) {
|
||||
final Object obj = req.getSession()
|
||||
.getAttribute(SSCConstants.USER_INFO);
|
||||
final HttpSession session = req.getSession(false);
|
||||
if (session == null) {
|
||||
return null;
|
||||
}
|
||||
final Object obj = session.getAttribute(SSCConstants.USER_INFO);
|
||||
if (obj instanceof LoginInfo) {
|
||||
final LoginInfo loginInfo = (LoginInfo) obj;
|
||||
if (loginInfo.isAdministrator()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue