增加消息菜单里发送统计的访问权限.
This commit is contained in:
@@ -46,4 +46,9 @@ public class AuthConfig {
|
||||
* @since 1.0.9
|
||||
*/
|
||||
private boolean enableClusterAuthority;
|
||||
|
||||
/**
|
||||
* 重新加载权限信息,版本升级替换jar包的时候,新版本里增加了新的权限菜单,这个设置为true.
|
||||
*/
|
||||
private boolean reloadPermission;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class MessageController {
|
||||
return messageService.delete(messages);
|
||||
}
|
||||
|
||||
@Permission("message:send-statistics")
|
||||
@PostMapping("/send/statistics")
|
||||
public Object sendStatistics(@RequestBody QuerySendStatisticsDTO dto) {
|
||||
if (StringUtils.isEmpty(dto.getTopic())) {
|
||||
|
||||
@@ -71,6 +71,9 @@ public class DataInit implements SmartInitializingSingleton {
|
||||
initData(connection, SqlParse.ROLE_TABLE);
|
||||
}
|
||||
|
||||
if (authConfig.isReloadPermission()) {
|
||||
permissionMapper.delete(null);
|
||||
}
|
||||
Integer permCount = permissionMapper.selectCount(null);
|
||||
if (permCount == null || permCount == 0) {
|
||||
initData(connection, SqlParse.PERM_TABLE);
|
||||
|
||||
Reference in New Issue
Block a user