blindsidenetworks / scalelite

Scalable load balancer for BigBlueButton.
GNU Affero General Public License v3.0
465 stars 249 forks source link

Let Meeting.all return all meetings if tenant_id argument is not passed #1012

Closed Ithanil closed 11 months ago

Ithanil commented 11 months ago

Let Meeting.all return all meetings, regardless of tenant association, if tenant_id argument is not passed.

Description

Previously, with Multitenancy enabled, Meeting.all would return only meetings without tenant association if the optional argument tenant_id was not passed. This leads to numerous bugs in the code, because the tenant_id argument is not passed in many cases. An example would be https://github.com/blindsidenetworks/scalelite/issues/1010 .

I propose to let Meeting.all return all meetings, regardless of tenant association, when it is called without tenant_id. In any case where only a certain tenant is considered, the tenant_id would have to be passed anyway. This fixes the issues with meetings remaining associated after panicking/disabling servers with Multitenancy enabled.

Testing Steps

Test all the uses of Meeting.all:

https://github.com/search?q=repo%3Ablindsidenetworks%2Fscalelite%20Meeting.all&type=code

Fixed Issues

At least: https://github.com/blindsidenetworks/scalelite/issues/993 https://github.com/blindsidenetworks/scalelite/issues/1010

farhatahmad commented 11 months ago

Thanks for the PR - I was looking in the wrong area

farhatahmad commented 11 months ago

1011 Can be closed correct?

Ithanil commented 11 months ago

1011 Can be closed correct?

Yes, if this PR here is merged, the other one can be closed.

farhatahmad commented 11 months ago

I'll fix the tests in a follow up PR - thanks for this