移除一些anyscript特性

This commit is contained in:
undefined committed 2020-08-09 11:41:45 +08:00
1 parent c3ff5856e4
commit cc62fd3cd7
7 files changed
+97 -19

No files matched your search

+2 -1
View File
@@ -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);