Skip to content

Commit 2cebeca

Browse files
author
Vikas Agarwal
committed
Github issue#1243, Connect Admin role
— Making connect admin a project manager when he/she joins a project
1 parent 50b2087 commit 2cebeca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/routes/projects/create.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ module.exports = [
6666
*/
6767
(req, res, next) => {
6868
const project = req.body.param;
69-
const userRole = util.hasRole(req, USER_ROLE.MANAGER)
69+
// by default connect admin and managers joins projects as manager
70+
const userRole = util.hasRoles(req, [USER_ROLE.CONNECT_ADMIN, USER_ROLE.MANAGER])
7071
? PROJECT_MEMBER_ROLE.MANAGER
7172
: PROJECT_MEMBER_ROLE.CUSTOMER;
7273
// set defaults
@@ -136,6 +137,7 @@ module.exports = [
136137
req.log.error(err);
137138
return Promise.resolve();
138139
});
140+
// return Promise.resolve();
139141
})
140142

141143
.then(() => {

0 commit comments

Comments
 (0)