Skip to content

Commit

Permalink
[Fix] Voip endpoint permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaza98 committed Jun 8, 2022
1 parent b021a2f commit 95558fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/meteor/app/api/server/v1/voip/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ const parseAndValidate = (property: string, date?: string): DateParam => {

API.v1.addRoute(
'voip/room',
{ authRequired: false, rateLimiterOptions: { numRequestsAllowed: 5, intervalTimeInMS: 60000 } },
{
authRequired: true,
rateLimiterOptions: { numRequestsAllowed: 5, intervalTimeInMS: 60000 },
permissionsRequired: ['inbound-voip-calls'],
},
{
async get() {
const defaultCheckParams = {
Expand Down Expand Up @@ -212,7 +216,7 @@ API.v1.addRoute(
*/
API.v1.addRoute(
'voip/room.close',
{ authRequired: true },
{ authRequired: true, permissionsRequired: ['inbound-voip-calls'] },
{
async post() {
check(this.bodyParams, {
Expand Down

0 comments on commit 95558fd

Please sign in to comment.