mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: fix #973
This commit is contained in:
4 files changed
+60
-46
No files matched your search
@@ -4,7 +4,7 @@ import moment from 'moment-timezone';
|
||||
import type { Context } from '../context';
|
||||
import {
|
||||
CannotDeleteSystemDomainError, DomainJoinAlreadyMemberError, DomainJoinForbiddenError, ForbiddenError,
|
||||
InvalidJoinInvitationCodeError, NotFoundError, OnlyOwnerCanDeleteDomainError, PermissionError, RoleAlreadyExistError, ValidationError,
|
||||
InvalidJoinInvitationCodeError, OnlyOwnerCanDeleteDomainError, PermissionError, RoleAlreadyExistError, ValidationError,
|
||||
} from '../error';
|
||||
import type { DomainDoc } from '../interface';
|
||||
import avatar from '../lib/avatar';
|
||||
@@ -337,7 +337,6 @@ class DomainJoinHandler extends Handler {
|
||||
domain.get(target),
|
||||
domain.collUser.findOne({ domainId: target, uid: this.user._id }),
|
||||
]);
|
||||
if (!dudoc) throw new NotFoundError(target);
|
||||
const assignedRole = this.user.hasPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN)
|
||||
? 'root'
|
||||
: dudoc?.role || 'default';
|
||||
|
||||
Reference in new issue
Block a user