Skip to content

Commit

Permalink
release v2.2.35 RBAC 新增接口.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroOrInfinity committed Mar 26, 2021
1 parent e94dc89 commit 8103fdc
Show file tree
Hide file tree
Showing 25 changed files with 108 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=g:top.dcenter%20AND%20a:ums-spring-boot-starter">
<img alt='maven' src="https://img.shields.io/badge/UMS-2.2.34-green.svg" />
<img alt='maven' src="https://img.shields.io/badge/UMS-2.2.35-green.svg" />
</a>
<a target="_blank" href="http://www.opensource.org/licenses/mit-license.php">
<img alt='license' src="https://img.shields.io/badge/license-MIT-yellow.svg" />
Expand Down
2 changes: 1 addition & 1 deletion Readme.osc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=g:top.dcenter%20AND%20a:ums-spring-boot-starter">
<img alt='maven' src="https://img.shields.io/badge/UMS-2.2.34-green.svg" />
<img alt='maven' src="https://img.shields.io/badge/UMS-2.2.35-green.svg" />
</a>
<a target="_blank" href="http://www.opensource.org/licenses/mit-license.php">
<img alt='license' src="https://img.shields.io/badge/license-MIT-yellow.svg" />
Expand Down
4 changes: 4 additions & 0 deletions UpdatedLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.35
### Fixes and Improvements:
1. rbac/新增: 添加 getMenuByRole 与 getMenuByRoleOfTenant 接口, 以适用与菜单 与 权限分开设计的权限模型; 添加 getRolesOfUser 与 getMenusOfUser 接口并实现 getRolesOfUser 接口.

## 2.2.34
### Fixes and Improvements:
1. rbac/重构: UpdateCacheOfRolesResourcesService 添加 initAllAuthorities() 接口, AbstractUriAuthorizeService 删除 updateAuthoritiesOfAllXXX() 接口,
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ums-commons</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion demo/basic-detail-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion demo/basic-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>basic-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion demo/demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion demo/justAuth-security-oauth2-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demo/jwt-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jwt-example</artifactId>
Expand Down
81 changes: 81 additions & 0 deletions demo/permission-example/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
# 权限表
```sql
CREATE TABLE `sys_resources` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`available` bit(1) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建记录时间',
`external` bit(1) DEFAULT NULL,
`icon` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`parent_id` bigint(20) DEFAULT NULL,
`permission` varchar(255) DEFAULT NULL,
`sort` int(11) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新记录时间',
`url` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_sys_resource_parent_id` (`parent_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4

CREATE TABLE `sys_role` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`available` bit(1) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建记录时间',
`description` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新记录时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4

CREATE TABLE `sys_role_resources` (
`resources_id` bigint(20) NOT NULL,
`role_id` bigint(20) NOT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`resources_id`,`role_id`),
KEY `idx_role_id` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4

CREATE TABLE `sys_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`authorities` varchar(255) DEFAULT NULL,
`avatar` varchar(255) DEFAULT NULL,
`birthday` datetime DEFAULT NULL,
`blog` varchar(255) DEFAULT NULL,
`company` varchar(255) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建记录时间',
`email` varchar(255) DEFAULT NULL,
`experience` int(11) DEFAULT NULL,
`gender` int(11) DEFAULT NULL,
`last_login_ip` varchar(255) DEFAULT NULL,
`last_login_time` datetime DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`login_count` int(11) DEFAULT NULL,
`mobile` varchar(255) DEFAULT NULL,
`nickname` varchar(255) DEFAULT NULL,
`notification` int(11) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`privacy` int(11) DEFAULT NULL,
`qq` varchar(255) DEFAULT NULL,
`reg_ip` varchar(255) DEFAULT NULL,
`remark` varchar(255) DEFAULT NULL,
`score` int(11) DEFAULT NULL,
`source` int(11) DEFAULT NULL,
`status` tinyint(4) DEFAULT '0' COMMENT '用户状态: 0 为 正常, 1 为删除',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新记录时间',
`user_type` int(11) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
`uuid` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4

CREATE TABLE `sys_user_role` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建记录时间',
`role_id` bigint(20) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新记录时间',
`user_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4
```

# 权限更新及权限缓存实时更新时序图

![权限更新及权限缓存实时更新时序图](../../doc/RBAC%20权限更新及权限缓存实时更新流程.png)
2 changes: 1 addition & 1 deletion demo/permission-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>permission-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion demo/quickStart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demo/session-detail-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion demo/tenant-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion demo/validate-code-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums-demo</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>validate-code-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion mdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion oauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>top.dcenter</groupId>
<artifactId>ums</artifactId>
<version>2.2.34</version>
<version>2.2.35</version>

<packaging>pom</packaging>
<name>ums</name>
Expand Down
2 changes: 1 addition & 1 deletion rbac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion ums-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>top.dcenter</groupId>
<artifactId>ums-dependencies</artifactId>
<version>2.2.34</version>
<version>2.2.35</version>
<name>ums-dependencies</name>
<packaging>pom</packaging>
<description>UMS Dependencies</description>
Expand Down
2 changes: 1 addition & 1 deletion ums-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion vc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>ums</artifactId>
<groupId>top.dcenter</groupId>
<version>2.2.34</version>
<version>2.2.35</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit 8103fdc

Please sign in to comment.