Elgg
Version master
engine
classes
Elgg
Router
Middleware
PageOwnerCanEditGatekeeper.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Router\Middleware
;
4
5
use
Elgg\Exceptions\Http\EntityPermissionsException
;
6
12
class
PageOwnerCanEditGatekeeper
extends
PageOwnerGatekeeper
{
13
19
protected
function
assert
(\
Elgg
\
Request
$request
, \
Elgg
\
Router
\
Route
$route): void {
20
21
// assert we have a logged in user
22
$request
->
elgg
()->gatekeeper->assertAuthenticatedUser();
23
24
parent::assert(
$request
, $route);
25
26
if
(!$this->page_owner->canEdit()) {
27
throw
new
EntityPermissionsException
();
28
}
29
}
30
}
Elgg\Exceptions\Http\EntityPermissionsException
Thrown when entity can not be edited or container permissions do not allow it to be written.
Definition:
EntityPermissionsException.php:10
Elgg\Request
Request container.
Definition:
Request.php:12
Elgg\Router\Middleware\PageOwnerCanEditGatekeeper
Check if the current route page owner can be edited (by the current logged in user)
Definition:
PageOwnerCanEditGatekeeper.php:12
Elgg\Router\Middleware\PageOwnerCanEditGatekeeper\assert
assert(\Elgg\Request $request, \Elgg\Router\Route $route)
{}
Definition:
PageOwnerCanEditGatekeeper.php:19
Elgg\Router\Middleware\PageOwnerGatekeeper
Check if the current route has a page owner entity.
Definition:
PageOwnerGatekeeper.php:13
Elgg\Router\Route
Route Wrapper.
Definition:
Route.php:8
Elgg\Router
Delegates requests to controllers based on the registered configuration.
Definition:
Router.php:26
elgg
elgg()
Bootstrapping and helper procedural code available for use in Elgg core and plugins.
Definition:
elgglib.php:12
$request
$request
Definition:
livesearch.php:12
Elgg\Router\Middleware
Definition:
ActionMiddleware.php:3
Elgg
Definition:
ActionsService.php:3
Generated on Fri Aug 29 2025 00:01:58 for Elgg by
1.9.1