mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-29 16:14:16 +08:00
operator login interface
This commit is contained in:
24
src/main/java/love/sola/netsupport/util/Checker.java
Normal file
24
src/main/java/love/sola/netsupport/util/Checker.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package love.sola.netsupport.util;
|
||||
|
||||
import love.sola.netsupport.wechat.Command;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/12/12.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class Checker {
|
||||
|
||||
public static boolean nonNull(Object... v) {
|
||||
for (Object o : v) if (o == null) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean authorized(HttpSession s, Command c) {
|
||||
return s != null && s.getAttribute("authorized") == c;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user