Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct(
$this->languageFactory = $languageFactory;
}

public function parse($language, IEvent $event, IEvent $previousEvent = null) {
public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== Application::ID) {
throw new \InvalidArgumentException();
}
Expand Down
4 changes: 2 additions & 2 deletions lib/BigBlueButton/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function createJoinUrl(Room $room, float $creationTime, string $displayna
*
* @return float|int creation time
*/
public function createMeeting(Room $room, Presentation $presentation = null) {
public function createMeeting(Room $room, ?Presentation $presentation = null) {
$bbb = $this->getServer();
$meetingParams = $this->buildMeetingParams($room, $presentation);

Expand All @@ -128,7 +128,7 @@ public function createMeeting(Room $room, Presentation $presentation = null) {
return $response->getCreationTime();
}

private function buildMeetingParams(Room $room, Presentation $presentation = null): CreateMeetingParameters {
private function buildMeetingParams(Room $room, ?Presentation $presentation = null): CreateMeetingParameters {
$createMeetingParams = new CreateMeetingParameters($room->uid, $room->name);
$createMeetingParams->setAttendeePW($room->attendeePassword);
$createMeetingParams->setModeratorPW($room->moderatorPassword);
Expand Down
14 changes: 6 additions & 8 deletions lib/Controller/HookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use OCA\BigBlueButton\Event\RecordingReadyEvent;
use OCA\BigBlueButton\Service\RoomService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IRequest;

Expand Down Expand Up @@ -53,12 +55,10 @@ public function isValidToken(): bool {
}

/**
* @PublicPage
*
* @NoCSRFRequired
*
* @return void
*/
#[PublicPage]
#[NoCSRFRequired]
public function meetingEnded($recordingmarks = false): void {
$recordingmarks = \boolval($recordingmarks);
$room = $this->getRoom();
Expand All @@ -71,12 +71,10 @@ public function meetingEnded($recordingmarks = false): void {
}

/**
* @PublicPage
*
* @NoCSRFRequired
*
* @return void
*/
#[PublicPage]
#[NoCSRFRequired]
public function recordingReady(): void {
$this->eventDispatcher->dispatchTyped(new RecordingReadyEvent($this->getRoom()));
}
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/JoinController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use OCA\BigBlueButton\Permission;
use OCA\BigBlueButton\Service\RoomService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\BackgroundJob\IJobList;
Expand Down Expand Up @@ -75,12 +77,10 @@ public function isValidToken(): bool {
}

/**
* @PublicPage
*
* @NoCSRFRequired
*
* @return RedirectResponse|TemplateResponse
*/
#[PublicPage]
#[NoCSRFRequired]
public function index($displayname, $u = '', $filename = '', $password = '') {
$room = $this->getRoom();

Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use OCA\BigBlueButton\TemplateProvider;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IRequest;

Expand All @@ -18,12 +20,10 @@ public function __construct(string $appName, IRequest $request, TemplateProvider
}

/**
* @NoAdminRequired
*
* @NoCSRFRequired
*
* @return TemplateResponse
*/
#[NoAdminRequired]
#[NoCSRFRequired]
public function index(): TemplateResponse {
return $this->templateProvider->getManager();
}
Expand Down
4 changes: 3 additions & 1 deletion lib/Controller/RestrictionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use OCA\BigBlueButton\Service\RestrictionService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IGroupManager;
use OCP\IRequest;
Expand Down Expand Up @@ -43,8 +44,9 @@ public function __construct(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function user(): DataResponse {
$user = $this->userManager->get($this->userId);
$groupIds = $this->groupManager->getUserGroupIds($user);
Expand Down
13 changes: 9 additions & 4 deletions lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use OCA\BigBlueButton\Service\RoomService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\IGroupManager;
use OCP\IRequest;
Expand Down Expand Up @@ -54,8 +55,9 @@ public function __construct(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function index(): DataResponse {
$user = $this->userManager->get($this->userId);
$groupIds = $this->groupManager->getUserGroupIds($user);
Expand All @@ -65,8 +67,9 @@ public function index(): DataResponse {
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function create(
string $name,
string $welcome,
Expand Down Expand Up @@ -104,8 +107,9 @@ public function create(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function update(
int $id,
string $name,
Expand Down Expand Up @@ -148,8 +152,9 @@ public function update(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function destroy(int $id): DataResponse {
$room = $this->service->find($id);

Expand Down
13 changes: 9 additions & 4 deletions lib/Controller/RoomShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use OCA\BigBlueButton\Service\RoomShareService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;

use OCP\IGroupManager;
Expand Down Expand Up @@ -56,8 +57,9 @@ public function __construct(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function index(): DataResponse {
$roomId = $this->request->getParam('id');

Expand Down Expand Up @@ -113,8 +115,9 @@ public function index(): DataResponse {
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function create(
int $roomId,
int $shareType,
Expand All @@ -134,8 +137,9 @@ public function create(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function update(
int $id,
int $roomId,
Expand Down Expand Up @@ -164,8 +168,9 @@ public function update(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function destroy(int $id): DataResponse {
return $this->handleNotFound(function () use ($id) {
$roomShare = $this->service->find($id);
Expand Down
16 changes: 11 additions & 5 deletions lib/Controller/ServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use OCA\BigBlueButton\Service\RoomService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;

use OCP\IRequest;
Expand Down Expand Up @@ -41,8 +42,9 @@ public function __construct(
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function isRunning(string $roomUid): DataResponse {
$room = $this->service->findByUid($roomUid);

Expand All @@ -60,8 +62,9 @@ public function isRunning(string $roomUid): DataResponse {
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function insertDocument(string $roomUid, string $url, string $filename): DataResponse {
$room = $this->service->findByUid($roomUid);

Expand All @@ -79,8 +82,9 @@ public function insertDocument(string $roomUid, string $url, string $filename):
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function records(string $roomUid): DataResponse {
$room = $this->service->findByUid($roomUid);

Expand All @@ -104,8 +108,9 @@ public function records(string $roomUid): DataResponse {
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function deleteRecord(string $recordId): DataResponse {
$record = $this->server->getRecording($recordId);

Expand All @@ -125,8 +130,9 @@ public function deleteRecord(string $recordId): DataResponse {
}

/**
* @NoAdminRequired
* @return DataResponse
*/
#[NoAdminRequired]
public function publishRecord(string $recordId, bool $published): DataResponse {
$record = $this->server->getRecording($recordId);

Expand Down