Recording apis (#78)
* apis with auth * recording service * record permission * protocol 0.6.5 * bump version
This commit is contained in:
@@ -144,6 +144,14 @@ func EnsureListPermission(ctx context.Context) error {
|
||||
return ErrPermissionDenied
|
||||
}
|
||||
|
||||
func EnsureRecordPermission(ctx context.Context) error {
|
||||
claims := GetGrants(ctx)
|
||||
if claims == nil || !claims.Video.RoomRecord {
|
||||
return ErrPermissionDenied
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// wraps authentication errors around Twirp
|
||||
func twirpAuthError(err error) error {
|
||||
return twirp.NewError(twirp.Unauthenticated, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user