Merge pull request '项目管理与特色专区代码融合' (#668) from otto/microservices:master into master

This commit is contained in:
otto 2024-09-13 13:54:09 +08:00
commit 5cb8280ad2
3 changed files with 7 additions and 14 deletions

View File

@ -239,16 +239,19 @@ public class SysUserController extends BaseController {
*/
@GetMapping("getInfo")
public AjaxResult getInfo() {
SysUserDeptRole userIdentity = SecurityUtils.getUserIdentity();
if (userIdentity == null) {
throw new ServiceException("当前组织不存在或无权限访问");
}
SysUser user = userService.selectUserById(SecurityUtils.getUserId());
user.setPassword(null);
// 角色集合
Set<String> roles = tokenService.getRolePermissions();
// 权限集合
Set<String> permissions = tokenService.getMenuPermissions();
SysUserDeptRole userIdentity = SecurityUtils.getUserIdentity();
if (!roles.contains("admin") && userIdentity == null) {
throw new ServiceException("当前组织不存在或无权限访问");
}
AjaxResult ajax = AjaxResult.success();
ajax.put("user", user);
ajax.put("gitlinkUrl", gitLinkUrl);

View File

@ -1,7 +0,0 @@
-- 专区管理员增加修改组织权限
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (5, 1019);
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -1,3 +0,0 @@
-- 专区文章表增加Keywords关键字
alter table cms_doc
add keywords varchar(255) null comment '关键词';