Browse Source

fix(api): use role passed in body or fallbacks to viewer

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4134/head
Pranav C 2 years ago
parent
commit
035e5fcf71
  1. 2
      packages/nocodb/src/lib/meta/api/orgUserApis.ts

2
packages/nocodb/src/lib/meta/api/orgUserApis.ts

@ -122,7 +122,7 @@ async function userAdd(req, res, next) {
invite_token,
invite_token_expires: new Date(Date.now() + 24 * 60 * 60 * 1000),
email,
roles: OrgUserRoles.VIEWER,
roles: req.body.roles || OrgUserRoles.VIEWER,
token_version: randomTokenString(),
});

Loading…
Cancel
Save