Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
199b6ad4
Commit
199b6ad4
authored
Jun 19, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a new security.voters service to allow for easier extensibility
parent
a105baec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/Silex/Provider/SecurityServiceProvider.php
src/Silex/Provider/SecurityServiceProvider.php
+6
-2
No files found.
src/Silex/Provider/SecurityServiceProvider.php
View file @
199b6ad4
...
@@ -95,10 +95,14 @@ class SecurityServiceProvider implements ServiceProviderInterface
...
@@ -95,10 +95,14 @@ class SecurityServiceProvider implements ServiceProviderInterface
});
});
$app
[
'security.access_manager'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
$app
[
'security.access_manager'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
new
AccessDecisionManager
(
array
(
return
new
AccessDecisionManager
(
$app
[
'security.voters'
]);
});
$app
[
'security.voters'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
return
array
(
new
RoleHierarchyVoter
(
new
RoleHierarchy
(
$app
[
'security.role_hierarchy'
])),
new
RoleHierarchyVoter
(
new
RoleHierarchy
(
$app
[
'security.role_hierarchy'
])),
new
AuthenticatedVoter
(
$app
[
'security.trust_resolver'
]),
new
AuthenticatedVoter
(
$app
[
'security.trust_resolver'
]),
)
)
;
);
});
});
$app
[
'security.firewall'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
$app
[
'security.firewall'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment