summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/AccessListener.php6
-rw-r--r--Http/Firewall/SwitchUserListener.php5
-rw-r--r--Http/composer.json4
3 files changed, 11 insertions, 4 deletions
diff --git a/Http/Firewall/AccessListener.php b/Http/Firewall/AccessListener.php
index c234317..75798b9 100644
--- a/Http/Firewall/AccessListener.php
+++ b/Http/Firewall/AccessListener.php
@@ -67,7 +67,11 @@ class AccessListener implements ListenerInterface
}
if (!$this->accessDecisionManager->decide($token, $attributes, $request)) {
- throw new AccessDeniedException();
+ $exception = new AccessDeniedException();
+ $exception->setAttributes($attributes);
+ $exception->setSubject($request);
+
+ throw $exception;
}
}
}
diff --git a/Http/Firewall/SwitchUserListener.php b/Http/Firewall/SwitchUserListener.php
index 7de83d2..e9c3e40 100644
--- a/Http/Firewall/SwitchUserListener.php
+++ b/Http/Firewall/SwitchUserListener.php
@@ -122,7 +122,10 @@ class SwitchUserListener implements ListenerInterface
}
if (false === $this->accessDecisionManager->decide($token, array($this->role))) {
- throw new AccessDeniedException();
+ $exception = new AccessDeniedException();
+ $exception->setAttributes($this->role);
+
+ throw $exception;
}
$username = $request->get($this->usernameParameter);
diff --git a/Http/composer.json b/Http/composer.json
index f19d0e4..add5d3a 100644
--- a/Http/composer.json
+++ b/Http/composer.json
@@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.5.9",
- "symfony/security-core": "~2.8|~3.0",
+ "symfony/security-core": "~3.2",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/http-foundation": "~2.8|~3.0",
"symfony/http-kernel": "~2.8|~3.0",
@@ -43,7 +43,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "3.2-dev"
}
}
}