UnauthorizedException
class UnauthorizedException extends HttpException
Methods
static UnauthorizedException
forRoles(array $roles)
Create an exception for missing roles.
static UnauthorizedException
forPermissions(array $permissions)
Create an exception for missing permissions.
static UnauthorizedException
forRolesOrPermissions(array $rolesOrPermissions)
Create an exception for missing roles or permissions.
static UnauthorizedException
missingTraitHasRoles(object $user)
Create an exception for a user missing the HasRoles trait.
static UnauthorizedException
notLoggedIn()
Create an exception for a missing authenticated user.
array
getRequiredRoles()
Get the roles required by the failed check.
array
getRequiredPermissions()
Get the permissions required by the failed check.
Details
at line 31
static UnauthorizedException
forRoles(array $roles)
Create an exception for missing roles.
at line 50
static UnauthorizedException
forPermissions(array $permissions)
Create an exception for missing permissions.
at line 69
static UnauthorizedException
forRolesOrPermissions(array $rolesOrPermissions)
Create an exception for missing roles or permissions.
at line 86
static UnauthorizedException
missingTraitHasRoles(object $user)
Create an exception for a user missing the HasRoles trait.
at line 96
static UnauthorizedException
notLoggedIn()
Create an exception for a missing authenticated user.
at line 106
array
getRequiredRoles()
Get the roles required by the failed check.
at line 116
array
getRequiredPermissions()
Get the permissions required by the failed check.