Skip to content

Commit 0ffea0e

Browse files
authored
Merge pull request #38 from littleredbutton/add-always-accept-auth-guest-policy
Add always_accept_auth guest-policy
2 parents 8e91899 + 4147809 commit 0ffea0e

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ if ($createMeetingResponse->success()) {
130130
}
131131
```
132132

133+
##### Experimental features
134+
> :warning: **Not officially supported by bbb**
135+
136+
**Guest policy**
137+
Beside the guest policies ALWAYS_ACCEPT, ALWAYS_DENY, and ASK_MODERATOR there is also the option ALWAYS_ACCEPT_AUTH. [sourcecode](https://github.com/bigbluebutton/bigbluebutton/blob/41f19a2cd1bc7dae76cbd805cdc3ddfbf1e6ab18/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/GuestPolicy.java#L7)
138+
139+
ASK_MODERATOR is asking the moderator(s) to accept or decline the join of a user or guest. When using our api guest users are by default marked as 'unauthorized' users.
140+
141+
By using the option ALWAYS_ACCEPT_AUTH all authorized users (non-guests) can directly join the meeting and the moderators approval is only required for unauthorized users, like guests.
142+
143+
144+
```php
145+
$createMeetingParams->setGuestPolicyAlwaysAcceptAuth();
146+
```
147+
148+
133149
#### Join a meeting
134150
```php
135151
use BigBlueButton\Parameters\JoinMeetingParameters;

src/Parameters/CreateMeetingParameters.php

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
*/
2424
class CreateMeetingParameters extends MetaParameters
2525
{
26-
const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
27-
const ALWAYS_DENY = 'ALWAYS_DENY';
28-
const ASK_MODERATOR = 'ASK_MODERATOR';
26+
const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
27+
const ALWAYS_DENY = 'ALWAYS_DENY';
28+
const ASK_MODERATOR = 'ASK_MODERATOR';
29+
const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';
2930

3031
/**
3132
* @var string
@@ -925,6 +926,7 @@ public function isGuestPolicyAskModerator()
925926
}
926927

927928
/**
929+
* Ask moderator on join of non-moderators if user/guest is allowed to enter the meeting
928930
* @return CreateMeetingParameters
929931
*/
930932
public function setGuestPolicyAskModerator()
@@ -934,6 +936,25 @@ public function setGuestPolicyAskModerator()
934936
return $this;
935937
}
936938

939+
/**
940+
* @return bool
941+
*/
942+
public function isGuestPolicyAlwaysAcceptAuth()
943+
{
944+
return $this->guestPolicy === self::ALWAYS_ACCEPT_AUTH;
945+
}
946+
947+
/**
948+
* Ask moderator on join of guests is allowed to enter the meeting, user are allowed to join directly
949+
* @return CreateMeetingParameters
950+
*/
951+
public function setGuestPolicyAlwaysAcceptAuth()
952+
{
953+
$this->guestPolicy = self::ALWAYS_ACCEPT_AUTH;
954+
955+
return $this;
956+
}
957+
937958
/**
938959
* @return bool
939960
*/

0 commit comments

Comments
 (0)