fix: jira用户校验权限报错
This commit is contained in:
parent
9a793107c8
commit
c2a9911138
|
@ -111,7 +111,7 @@ public class ProjectService {
|
|||
// 创建项目为当前用户添加用户组
|
||||
UserGroup userGroup = new UserGroup();
|
||||
userGroup.setId(UUID.randomUUID().toString());
|
||||
userGroup.setUserId(project.getCreateUser());
|
||||
userGroup.setUserId(SessionUtils.getUserId());
|
||||
userGroup.setCreateTime(System.currentTimeMillis());
|
||||
userGroup.setUpdateTime(System.currentTimeMillis());
|
||||
userGroup.setGroupId(UserGroupConstants.PROJECT_ADMIN);
|
||||
|
@ -119,7 +119,7 @@ public class ProjectService {
|
|||
userGroupMapper.insert(userGroup);
|
||||
|
||||
// 创建新项目检查当前用户 last_project_id
|
||||
extUserMapper.updateLastProjectIdIfNull(project.getId(), project.getCreateUser());
|
||||
extUserMapper.updateLastProjectIdIfNull(project.getId(), SessionUtils.getUserId());
|
||||
|
||||
return project;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public abstract class JiraAbstractClient extends BaseClient {
|
|||
|
||||
public void auth() {
|
||||
try {
|
||||
restTemplate.exchange(getBaseUrl() + "/permissions", HttpMethod.GET, getAuthHttpEntity(), String.class);
|
||||
restTemplate.exchange(getBaseUrl() + "/myself", HttpMethod.GET, getAuthHttpEntity(), String.class);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
MSException.throwException(e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue