stack
stack copied to clipboard
[Feature Request] Initial permission when inviting user
It would be nice if I could apply permissions when inviting a user. Something like:
// Server side
await team.inviteUser({
email: '[email protected]',
permissions: ['permission1', 'permission2']
});
Many services allow you to set the permission/role of a user while inviting them:
Proposal
Modify team.inviteUser (in ServerTeam) to accept permissions which is an array of 1 or more permissions to grant. Because this is in ServerTeam, we do not have to worry about whether the user inviting another user has permission to grant the specified permissions to the invited user.
await team.inviteUser({
email: '[email protected]',
permissions: ['permission1', 'permission2']
});
@fomalhautb Any problem with me creating a PR for this? Thanks.