mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
移除一些anyscript特性
This commit is contained in:
1 parent
c3ff5856e4
commit
cc62fd3cd7
7 files changed
+97
-19
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import moment from 'moment-timezone';
|
||||
import { Dictionary } from 'lodash';
|
||||
import {
|
||||
RoleAlreadyExistError, ValidationError, DomainJoinForbiddenError,
|
||||
DomainJoinAlreadyMemberError, InvalidJoinInvitationCodeError,
|
||||
@@ -170,7 +171,7 @@ class DomainRoleHandler extends ManageHandler {
|
||||
@param('role', Types.String)
|
||||
async postAdd(domainId: string, role: string) {
|
||||
const roles = await domain.getRoles(this.domain);
|
||||
const rdict: any = {};
|
||||
const rdict: Dictionary<any> = {};
|
||||
for (const r of roles) rdict[r._id] = r.perm;
|
||||
if (rdict[role]) throw new RoleAlreadyExistError(role);
|
||||
await domain.addRole(domainId, role, rdict.default.perm);
|
||||
|
||||
Reference in new issue
Block a user