only allow room owner to perform recording actions

This commit is contained in:
Zachary Chai
2016-11-01 12:03:00 -04:00
parent e400bf41e8
commit 15411d76fa
5 changed files with 23 additions and 16 deletions

View File

@ -38,12 +38,12 @@ class BbbController < ApplicationController
# GET /rooms/:id/recordings
def recordings
user = User.find_by username: params[:id]
if !user
@user = User.find_by username: params[:id]
if !@user
render head(:not_found) && return
end
bbb_res = bbb_get_recordings user.username
bbb_res = bbb_get_recordings @user.username
render_bbb_response bbb_res, bbb_res[:recordings]
end