fix(系统设置): 项目管理员移除成员问题#1004968
This commit is contained in:
parent
622d92aff4
commit
c946b7ba86
|
@ -229,11 +229,10 @@ public class UserController {
|
||||||
@GetMapping("/project/member/delete/{projectId}/{userId}")
|
@GetMapping("/project/member/delete/{projectId}/{userId}")
|
||||||
// @MsAuditLog(module = "workspace_member", type = OperLogConstants.DELETE, title = "删除工作空间成员")
|
// @MsAuditLog(module = "workspace_member", type = OperLogConstants.DELETE, title = "删除工作空间成员")
|
||||||
public void deleteProjectMember(@PathVariable String projectId, @PathVariable String userId) {
|
public void deleteProjectMember(@PathVariable String projectId, @PathVariable String userId) {
|
||||||
// workspaceService.checkWorkspaceOwner(workspaceId);
|
String currentUserId = SessionUtils.getUser().getId();
|
||||||
// String currentUserId = SessionUtils.getUser().getId();
|
if (StringUtils.equals(userId, currentUserId)) {
|
||||||
// if (StringUtils.equals(userId, currentUserId)) {
|
MSException.throwException(Translator.get("cannot_remove_current"));
|
||||||
// MSException.throwException(Translator.get("cannot_remove_current"));
|
}
|
||||||
// }
|
|
||||||
userService.deleteProjectMember(projectId, userId);
|
userService.deleteProjectMember(projectId, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,12 +170,12 @@
|
||||||
initTableData() {
|
initTableData() {
|
||||||
let param = {
|
let param = {
|
||||||
name: this.condition.name,
|
name: this.condition.name,
|
||||||
organizationId: this.currentUser().lastOrganizationId
|
organizationId: this.orgId
|
||||||
};
|
};
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {
|
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
let url = "/user/group/list/org/" + this.currentUser().lastOrganizationId;
|
let url = "/user/group/list/org/" + this.orgId;
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
this.$get(url + "/" + encodeURIComponent(this.tableData[i].id), response => {
|
this.$get(url + "/" + encodeURIComponent(this.tableData[i].id), response => {
|
||||||
let groups = response.data;
|
let groups = response.data;
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
this.updateVisible = true;
|
this.updateVisible = true;
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
let groupIds = this.form.groups.map(r => r.id);
|
let groupIds = this.form.groups.map(r => r.id);
|
||||||
this.result = this.$post('/user/group/list', {type: GROUP_ORGANIZATION, resourceId: this.currentUser().lastOrganizationId}, response => {
|
this.result = this.$post('/user/group/list', {type: GROUP_ORGANIZATION, resourceId: this.orgId}, response => {
|
||||||
this.$set(this.form, "allgroups", response.data);
|
this.$set(this.form, "allgroups", response.data);
|
||||||
})
|
})
|
||||||
// 编辑使填充角色信息
|
// 编辑使填充角色信息
|
||||||
|
@ -241,7 +241,7 @@
|
||||||
email: this.form.email,
|
email: this.form.email,
|
||||||
phone: this.form.phone,
|
phone: this.form.phone,
|
||||||
groupIds: this.form.groupIds,
|
groupIds: this.form.groupIds,
|
||||||
organizationId: this.currentUser().lastOrganizationId
|
organizationId: this.orgId
|
||||||
};
|
};
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
cancelButtonText: this.$t('commons.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.result = this.$get('/user/org/member/delete/' + this.currentUser().lastOrganizationId + '/' + encodeURIComponent(row.id), () => {
|
this.result = this.$get('/user/org/member/delete/' + this.orgId + '/' + encodeURIComponent(row.id), () => {
|
||||||
this.$success(this.$t('commons.remove_success'));
|
this.$success(this.$t('commons.remove_success'));
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue