Skip to content

Commit

Permalink
fix: remove role permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Dec 10, 2023
1 parent 4891917 commit 7afa147
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions apps/api/src/app/invites/dtos/invite-member.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ export class InviteMemberDto {
@IsEmail()
@IsNotEmpty()
email: string;

@IsString()
role: 'admin';
}
2 changes: 1 addition & 1 deletion apps/api/src/app/invites/invites.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class InvitesController {
userId: user._id,
organizationId: user.organizationId,
email: body.email,
role: body.role as MemberRoleEnum,
role: MemberRoleEnum.ADMIN,
});

await this.inviteMemberUsecase.execute(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BulkInvite {
await this.inviteMemberUsecase.execute(
InviteMemberCommand.create({
email: invitee.email,
role: invitee.role || MemberRoleEnum.ADMIN,
role: MemberRoleEnum.ADMIN,
organizationId: command.organizationId,
userId: command.userId,
})
Expand Down

0 comments on commit 7afa147

Please sign in to comment.