Skip to content

Commit

Permalink
Merge pull request #38 from littleredbutton/add-always-accept-auth-gu…
Browse files Browse the repository at this point in the history
…est-policy

Add always_accept_auth guest-policy
  • Loading branch information
SamuelWei committed Jul 28, 2020
2 parents 8e91899 + 4147809 commit 0ffea0e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,22 @@ if ($createMeetingResponse->success()) {
}
```

##### Experimental features
> :warning: **Not officially supported by bbb**
**Guest policy**
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)

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.

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.


```php
$createMeetingParams->setGuestPolicyAlwaysAcceptAuth();
```


#### Join a meeting
```php
use BigBlueButton\Parameters\JoinMeetingParameters;
Expand Down
27 changes: 24 additions & 3 deletions src/Parameters/CreateMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
*/
class CreateMeetingParameters extends MetaParameters
{
const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
const ALWAYS_DENY = 'ALWAYS_DENY';
const ASK_MODERATOR = 'ASK_MODERATOR';
const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
const ALWAYS_DENY = 'ALWAYS_DENY';
const ASK_MODERATOR = 'ASK_MODERATOR';
const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';

/**
* @var string
Expand Down Expand Up @@ -925,6 +926,7 @@ public function isGuestPolicyAskModerator()
}

/**
* Ask moderator on join of non-moderators if user/guest is allowed to enter the meeting
* @return CreateMeetingParameters
*/
public function setGuestPolicyAskModerator()
Expand All @@ -934,6 +936,25 @@ public function setGuestPolicyAskModerator()
return $this;
}

/**
* @return bool
*/
public function isGuestPolicyAlwaysAcceptAuth()
{
return $this->guestPolicy === self::ALWAYS_ACCEPT_AUTH;
}

/**
* Ask moderator on join of guests is allowed to enter the meeting, user are allowed to join directly
* @return CreateMeetingParameters
*/
public function setGuestPolicyAlwaysAcceptAuth()
{
$this->guestPolicy = self::ALWAYS_ACCEPT_AUTH;

return $this;
}

/**
* @return bool
*/
Expand Down

0 comments on commit 0ffea0e

Please sign in to comment.