diff --git a/backend/src/main/java/io/metersphere/service/OrganizationService.java b/backend/src/main/java/io/metersphere/service/OrganizationService.java index 0d354c7f39..a88e4f7b31 100644 --- a/backend/src/main/java/io/metersphere/service/OrganizationService.java +++ b/backend/src/main/java/io/metersphere/service/OrganizationService.java @@ -123,6 +123,10 @@ public class OrganizationService { list.add(r.getParentId()); } }); + + // ignore list size is 0 + list.add("no_such_id"); + OrganizationExample organizationExample = new OrganizationExample(); organizationExample.createCriteria().andIdIn(list); return organizationMapper.selectByExample(organizationExample); diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index 44080272a7..3881cac0c7 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -336,11 +336,11 @@ rule: { id: [ {required: true, message: this.$t('user.input_id'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'} + {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'} ], name: [ {required: true, message: this.$t('user.input_name'), trigger: 'blur'}, - {min: 2, max: 20, message: this.$t('commons.input_limit', [2, 20]), trigger: 'blur'}, + {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'}, { required: true, pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.ยท-]+$/, diff --git a/frontend/src/common/js/ajax.js b/frontend/src/common/js/ajax.js index 3ce85b05e0..af0021d005 100644 --- a/frontend/src/common/js/ajax.js +++ b/frontend/src/common/js/ajax.js @@ -18,6 +18,8 @@ export default { let login = function () { MessageBox.alert(i18n.t('commons.tips'), i18n.t('commons.prompt'), { callback: () => { + axios.get("/signout"); + localStorage.setItem('Admin-Token', "{}"); window.location.href = "/login" } });