stack icon indicating copy to clipboard operation
stack copied to clipboard

[Feature Request] Initial permission when inviting user

Open widavies opened this issue 8 months ago • 1 comments

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']
});

widavies avatar Apr 26 '25 19:04 widavies

Many services allow you to set the permission/role of a user while inviting them:

Image

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.

widavies avatar Apr 27 '25 20:04 widavies