提交 5ec2e010 编写于 作者: L lgcareer 提交者: qiaozhanwei

if login user is admin,it will has permission to query all udf function (#1799)

上级 b3418c8f
...@@ -287,7 +287,11 @@ public class UdfFuncService extends BaseService{ ...@@ -287,7 +287,11 @@ public class UdfFuncService extends BaseService{
*/ */
public Map<String, Object> queryResourceList(User loginUser, Integer type) { public Map<String, Object> queryResourceList(User loginUser, Integer type) {
Map<String, Object> result = new HashMap<>(5); Map<String, Object> result = new HashMap<>(5);
List<UdfFunc> udfFuncList = udfFuncMapper.getUdfFuncByType(loginUser.getId(), type); int userId = loginUser.getId();
if (isAdmin(loginUser)) {
userId = 0;
}
List<UdfFunc> udfFuncList = udfFuncMapper.getUdfFuncByType(userId, type);
result.put(Constants.DATA_LIST, udfFuncList); result.put(Constants.DATA_LIST, udfFuncList);
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册