Commit 5ec2e010 authored by lgcareer's avatar lgcareer Committed by qiaozhanwei
Browse files

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

parent b3418c8f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -287,7 +287,11 @@ public class UdfFuncService extends BaseService{
     */
    public Map<String, Object> queryResourceList(User loginUser, Integer type) {
        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);
        putMsg(result, Status.SUCCESS);