From 9b6890ca0af0adfd33d25ed9fc907b9a19e92ace Mon Sep 17 00:00:00 2001 From: "Johannes M. Schmitt" Date: Sun, 2 Jan 2011 10:50:38 +0100 Subject: [PATCH] updated to recent code change --- guides/security/acl.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guides/security/acl.rst b/guides/security/acl.rst index 2554605df44..fc929f829bf 100644 --- a/guides/security/acl.rst +++ b/guides/security/acl.rst @@ -97,7 +97,7 @@ Creating an ACL, and adding an ACE // retrieving the security identity of the currently logged-in user $securityContext = $this->container->get('security.context'); $user = $securityContext->getToken()->getUser(); - $securityIdentity = new UserSecurityIdentity($user); + $securityIdentity = UserSecurityIdentity::fromAccount($user); // grant owner access $acl->insertObjectAce($securityIdentity, MaskBuilder::MASK_OWNER); @@ -143,7 +143,8 @@ Checking Access throw new AccessDeniedException(); } - // do your editing here + // retrieve actual comment object, and do your editing here + // ... } In this example, we check whether the user has the ``EDIT`` permission.