权限优化

This commit is contained in:
暮光:城中城
2019-06-01 09:36:55 +08:00
parent 7f4f3fd432
commit 48f81dc547
22 changed files with 228 additions and 38 deletions

View File

@@ -15,6 +15,10 @@ public class DocUserUtil {
DocUserUtil.ACCESS_TOKEN.set(accessToken);
}
public static boolean havePageAuth(String authName, Long pageId) {
return haveAuth(authName + pageId);
}
public static boolean haveAuth(String... authNames) {
DocUserDetails currentUser = getCurrentUser();
if (currentUser == null) {