forked from github/dataease
perf: 企业版许可限制机制
This commit is contained in:
parent
c1b11ed31f
commit
6af4c59fe8
@ -83,6 +83,11 @@
|
|||||||
<value-type>java.lang.Integer</value-type>
|
<value-type>java.lang.Integer</value-type>
|
||||||
</cache>
|
</cache>
|
||||||
|
|
||||||
|
<cache alias="user_echelon" uses-template="common-cache">
|
||||||
|
<key-type>java.lang.String</key-type>
|
||||||
|
<value-type>java.util.List</value-type>
|
||||||
|
</cache>
|
||||||
|
|
||||||
<cache alias="role_busi_pers_interactive" uses-template="common-cache">
|
<cache alias="role_busi_pers_interactive" uses-template="common-cache">
|
||||||
<key-type>java.lang.String</key-type>
|
<key-type>java.lang.String</key-type>
|
||||||
<value-type>java.util.List</value-type>
|
<value-type>java.util.List</value-type>
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 34d3f25ca633156eb59b3118137b90be2c8b36a6
|
Subproject commit 58b266c2c89a305bcc14d3ea7a1f54f42deb665c
|
@ -9,6 +9,7 @@ import io.dataease.auth.DePermit;
|
|||||||
import io.dataease.auth.vo.TokenVO;
|
import io.dataease.auth.vo.TokenVO;
|
||||||
import io.dataease.model.KeywordRequest;
|
import io.dataease.model.KeywordRequest;
|
||||||
import io.dataease.request.BaseGridRequest;
|
import io.dataease.request.BaseGridRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.Hidden;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ public interface UserApi {
|
|||||||
@PostMapping("/byCurOrg")
|
@PostMapping("/byCurOrg")
|
||||||
List<UserItem> byCurOrg(@RequestBody KeywordRequest request);
|
List<UserItem> byCurOrg(@RequestBody KeywordRequest request);
|
||||||
|
|
||||||
|
@Hidden
|
||||||
@GetMapping("/userCount")
|
@GetMapping("/userCount")
|
||||||
int userCount();
|
int userCount();
|
||||||
|
|
||||||
@ -100,5 +102,7 @@ public interface UserApi {
|
|||||||
@PostMapping("/modifyPwd")
|
@PostMapping("/modifyPwd")
|
||||||
void modifyPwd(@RequestBody ModifyPwdRequest request);
|
void modifyPwd(@RequestBody ModifyPwdRequest request);
|
||||||
|
|
||||||
|
@Hidden
|
||||||
|
@GetMapping("/firstEchelon/{limit}")
|
||||||
|
List<Long> firstEchelon(@PathVariable("limit") Long limit);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package io.dataease.constant;
|
|||||||
public class CacheConstant {
|
public class CacheConstant {
|
||||||
public static class UserCacheConstant {
|
public static class UserCacheConstant {
|
||||||
public static final String USER_COUNT_CACHE = "user_count";
|
public static final String USER_COUNT_CACHE = "user_count";
|
||||||
|
public static final String USER_ECHELON_CACHE = "user_echelon";
|
||||||
public static final String LOGIN_USER_CACHE = "login_user_cache";
|
public static final String LOGIN_USER_CACHE = "login_user_cache";
|
||||||
public static final String USER_ROLES_CACHE = "user_roles";
|
public static final String USER_ROLES_CACHE = "user_roles";
|
||||||
public static final String USER_BUSI_PERS_CACHE = "user_busi_pers";
|
public static final String USER_BUSI_PERS_CACHE = "user_busi_pers";
|
||||||
|
@ -29,7 +29,7 @@ public class AuthUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSysAdmin(Long userId) {
|
public static boolean isSysAdmin(Long userId) {
|
||||||
return userId == SYS_ADMIN_UID;
|
return userId.equals(SYS_ADMIN_UID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user