mirror of https://github.com/Rekoe/rk_svnadmin
支持管理员 账号登陆
parent
70acd84e73
commit
cf053d49da
|
@ -57,7 +57,8 @@ public class AdminLoginAct {
|
||||||
Subject subject = SecurityUtils.getSubject();
|
Subject subject = SecurityUtils.getSubject();
|
||||||
ThreadContext.bind(subject);
|
ThreadContext.bind(subject);
|
||||||
subject.login(token);
|
subject.login(token);
|
||||||
Usr usr = usrService.fetch(Cnd.where("usr", "=", "admin"));
|
User user = (User) subject.getPrincipal();
|
||||||
|
Usr usr = usrService.fetch(Cnd.where("usr", "=", user.getName()));
|
||||||
if (!Lang.isEmpty(usr)) {
|
if (!Lang.isEmpty(usr)) {
|
||||||
session.setAttribute("usr", usr);
|
session.setAttribute("usr", usr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue