|
|
@@ -839,12 +839,12 @@ module.exports = function(crowi) {
|
|
|
return UserGroupRelation.findByGroupIdAndUser(grantUserGroupId, userData)
|
|
|
.then((relation) => {
|
|
|
if (relation == null) {
|
|
|
- return reject(new Error('no relations were exist for group and user.'));
|
|
|
+ return new Error('no relations were exist for group and user.');
|
|
|
}
|
|
|
return PageGroupRelation.findOrCreateRelationForPageAndGroup(page, relation.relatedGroup);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- return reject(new Error('No UserGroup is exists. userGroupId : ', grantUserGroupId));
|
|
|
+ return new Error('No UserGroup is exists. userGroupId : ', grantUserGroupId);
|
|
|
});
|
|
|
}
|
|
|
else {
|