cloud_bbb/lib/NoPermissionResponse.php

28 lines
579 B
PHP
Raw Normal View History

<?php
namespace OCA\BigBlueButton;
use OCP\AppFramework\Http\ContentSecurityPolicy;
2020-09-23 12:33:09 +02:00
use OCP\AppFramework\Http\Response;
use OCP\Template;
2024-10-28 14:59:01 +01:00
/**
* @template-extends Response<int, array<string, mixed>>
*
* (NC < 28)
* @psalm-suppress TooManyTemplateParams
2024-10-28 14:59:01 +01:00
*/
class NoPermissionResponse extends Response {
public function __construct() {
parent::__construct();
$this->setContentSecurityPolicy(new ContentSecurityPolicy());
2020-08-31 16:25:58 +02:00
$this->setStatus(403);
}
public function render() {
$template = new Template('core', '403', 'guest');
return $template->fetchPage();
}
}