Bristol SU Support Package
|
Public Member Functions | |
__construct (UserAuthentication $userAuthentication, Authentication $authentication) | |
handle (Request $request, \Closure $next) | |
Private Member Functions | |
hasUsers () | |
usersAreEqual () | |
Private Attributes | |
$userAuthentication | |
$authentication | |
Check the database user, if logged in, owns the control user, if logged in
Definition at line 16 of file CheckDatabaseUserOwnsControlUser.php.
BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser::__construct | ( | UserAuthentication | $userAuthentication, |
Authentication | $authentication | ||
) |
Initialise the middleware
UserAuthentication | $userAuthentication | Database user resolver |
Authentication | $authentication | Control user resolver |
Definition at line 39 of file CheckDatabaseUserOwnsControlUser.php.
References BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\$authentication, and BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\$userAuthentication.
BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser::handle | ( | Request | $request, |
\Closure | $next | ||
) |
Throw an error if the logged in user is not owned by the logged in database user
Request | $request | The request object |
\Closure | $next | The next middleware in the pipeline |
IncorrectLogin |
Definition at line 53 of file CheckDatabaseUserOwnsControlUser.php.
References BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\hasUsers(), and BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\usersAreEqual().
|
private |
Check if the authentication and the User Authentication have the users to check.
Definition at line 67 of file CheckDatabaseUserOwnsControlUser.php.
Referenced by BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\handle().
|
private |
Definition at line 72 of file CheckDatabaseUserOwnsControlUser.php.
Referenced by BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\handle().
|
private |
Definition at line 31 of file CheckDatabaseUserOwnsControlUser.php.
Referenced by BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\__construct().
|
private |
Definition at line 24 of file CheckDatabaseUserOwnsControlUser.php.
Referenced by BristolSU\Support\Authorization\Middleware\CheckDatabaseUserOwnsControlUser\__construct().