From 4b578f418a36e2b71baad5720988c84e9612b41f Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Thu, 9 Jan 2025 22:31:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E6=9C=A8=E6=8A=A5=E8=A1=A81.9.3?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83=EF=BC=88=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- jimureport-example/pom.xml | 2 +- .../extend/JimuReportTokenServiceImpl.java | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98fef59..754f13d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ v1.9.3 | 2025-01-08 org.jeecgframework.jimureport jimubi-spring-boot-starter - 1.9.1 + 1.9.3 ``` diff --git a/jimureport-example/pom.xml b/jimureport-example/pom.xml index 2fb3316..d5a23fc 100644 --- a/jimureport-example/pom.xml +++ b/jimureport-example/pom.xml @@ -78,7 +78,7 @@ org.jeecgframework.jimureport jimubi-spring-boot-starter - 1.9.1 + ${jimureport.version} diff --git a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuReportTokenServiceImpl.java b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuReportTokenServiceImpl.java index 0892d1f..19d875d 100644 --- a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuReportTokenServiceImpl.java +++ b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/extend/JimuReportTokenServiceImpl.java @@ -64,9 +64,26 @@ public class JimuReportTokenServiceImpl implements JmReportTokenServiceI { */ @Override public String[] getRoles(String token) { - return new String[]{"admin"}; + //积木内置三个角色 "admin","lowdeveloper","dbadeveloper" + return new String[]{"admin","lowdeveloper","dbadeveloper"}; } + + /** + * 自定义用户拥有的权限指令 + * + * @param token + * @return + */ + @Override + public String[] getPermissions(String token) { + //drag:datasource:testConnection 仪表盘数据库连接测试 + //onl:drag:clear:recovery 清空回收站 + //drag:analysis:sql SQL解析 + //drag:design:getTotalData 仪表盘对Online表单展示数据 + return new String[]{"drag:datasource:testConnection","onl:drag:clear:recovery","drag:analysis:sql","drag:design:getTotalData"}; + } + /** * Token校验 * @param token