Skip to content

Commit 751945a

Browse files
authored
Merge pull request #232 from topcoder-platform/hotfix/corrected_check_for_adding_manager_as_observer
Hotfix/corrected check for adding manager as observer
2 parents 96dc5e4 + edb66c8 commit 751945a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/projectMemberInvites/create.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ module.exports = [
181181
// permission:
182182
// user has to have constants.MANAGER_ROLES role
183183
// to be invited as PROJECT_MEMBER_ROLE.MANAGER
184-
if (invite.role === PROJECT_MEMBER_ROLE.MANAGER) {
184+
if (_.includes(PROJECT_MEMBER_MANAGER_ROLES, invite.role)) {
185185
_.forEach(invite.userIds, (userId) => {
186186
req.log.info(userId);
187187
promises.push(util.getUserRoles(userId, req.log, req.id));
@@ -207,6 +207,7 @@ module.exports = [
207207
const forbidUserList = [];
208208
_.zip(invite.userIds, rolesList).forEach((data) => {
209209
const [userId, roles] = data;
210+
req.log.debug(roles);
210211

211212
if (!util.hasIntersection(MANAGER_ROLES, roles)) {
212213
forbidUserList.push(userId);

0 commit comments

Comments
 (0)