Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Only allow admin, member roles in teams
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Sep 3, 2020
1 parent 17f0756 commit dc67971
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/groups/_id/memberships.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class GroupMembershipsController {
groupId: Joi.number().required(),
newMemberName: Joi.string().min(6).required(),
newMemberEmail: Joi.string().email().required(),
role: Joi.number(),
role: Joi.string().allow("ADMIN", "MEMBER").only(),
},
{
groupId,
Expand Down Expand Up @@ -92,7 +92,7 @@ export class GroupMembershipsController {
@Middleware(
validator(
{
role: Joi.string().allow("OWNER", "ADMIN", "RESELLER", "MEMBER").only(),
role: Joi.string().allow("ADMIN", "MEMBER").only(),
},
"body"
)
Expand Down

0 comments on commit dc67971

Please sign in to comment.