mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-28 23:55:04 +08:00
fix logic issue
This commit is contained in:
@@ -34,7 +34,7 @@ public class Register extends HttpServlet {
|
|||||||
response.addHeader("Content-type", "text/plain;charset=utf-8");
|
response.addHeader("Content-type", "text/plain;charset=utf-8");
|
||||||
|
|
||||||
HttpSession httpSession = request.getSession(false);
|
HttpSession httpSession = request.getSession(false);
|
||||||
if (Checker.authorized(httpSession, Command.REGISTER)) {
|
if (!Checker.authorized(httpSession, Command.REGISTER)) {
|
||||||
Redirect.message(response, 0, "Authorize_Failed");
|
Redirect.message(response, 0, "Authorize_Failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class TicketQuery extends HttpServlet {
|
|||||||
try (Session s = SQLCore.sf.openSession()) {
|
try (Session s = SQLCore.sf.openSession()) {
|
||||||
|
|
||||||
HttpSession httpSession = request.getSession(false);
|
HttpSession httpSession = request.getSession(false);
|
||||||
if (Checker.authorized(httpSession, Command.QUERY)) {
|
if (!Checker.authorized(httpSession, Command.QUERY)) {
|
||||||
return new Response(Response.ResponseCode.UNAUTHORIZED);
|
return new Response(Response.ResponseCode.UNAUTHORIZED);
|
||||||
}
|
}
|
||||||
User u = (User) httpSession.getAttribute("user");
|
User u = (User) httpSession.getAttribute("user");
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class TicketSubmit extends HttpServlet {
|
|||||||
try (Session s = SQLCore.sf.openSession()) {
|
try (Session s = SQLCore.sf.openSession()) {
|
||||||
|
|
||||||
HttpSession httpSession = request.getSession(false);
|
HttpSession httpSession = request.getSession(false);
|
||||||
if (Checker.authorized(httpSession, Command.SUBMIT)) {
|
if (!Checker.authorized(httpSession, Command.SUBMIT)) {
|
||||||
return new Response(Response.ResponseCode.UNAUTHORIZED);
|
return new Response(Response.ResponseCode.UNAUTHORIZED);
|
||||||
}
|
}
|
||||||
User u = (User) httpSession.getAttribute("user");
|
User u = (User) httpSession.getAttribute("user");
|
||||||
|
|||||||
Reference in New Issue
Block a user