Skip to content

Commit db19f45

Browse files
committed
update permissions for admin
1 parent 1a679eb commit db19f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes/projectMembers/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ module.exports = [
4444
err.status = 401;
4545
return next(err);
4646
}
47-
} else if (util.hasRoles(req, [USER_ROLE.MANAGER])) {
47+
} else if (util.hasRoles(req, [USER_ROLE.MANAGER, USER_ROLE.CONNECT_ADMIN])) {
4848
targetRole = PROJECT_MEMBER_ROLE.MANAGER;
49-
} else if (util.hasRoles(req, [USER_ROLE.COPILOT])) {
49+
} else if (util.hasRoles(req, [USER_ROLE.COPILOT, USER_ROLE.CONNECT_ADMIN])) {
5050
targetRole = PROJECT_MEMBER_ROLE.COPILOT;
5151
} else {
5252
const err = new Error('Only copilot or manager is able to call this endpoint');

0 commit comments

Comments
 (0)