Parcourir la source

Removed unnecessary code

Taichi Masuyama il y a 4 ans
Parent
commit
b7df847416
1 fichiers modifiés avec 0 ajouts et 18 suppressions
  1. 0 18
      packages/app/src/server/models/user-group.js

+ 0 - 18
packages/app/src/server/models/user-group.js

@@ -97,24 +97,6 @@ class UserGroup {
     };
   }
 
-  // Check if registerable
-  static isRegisterableName(name) {
-    const query = { name };
-
-    const childUserGroups = await this.find({ parent: { $in: parentIds } });
-
-    let grandChildUserGroups = null;
-    if (includeGrandChildren) {
-      const childUserGroupIds = childUserGroups.map(group => group._id);
-      grandChildUserGroups = await this.find({ parent: { $in: childUserGroupIds } });
-    }
-
-    return {
-      childUserGroups,
-      grandChildUserGroups,
-    };
-  }
-
   // Delete completely
   static async removeCompletelyById(deleteGroupId, action, transferToUserGroupId, user) {
     const UserGroupRelation = mongoose.model('UserGroupRelation');