<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ivan Gospodinow — Comments</title><link>https://ivangospodinow.com</link><description>Comments on Ivan Gospodinow's blog</description>
<item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2694</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2694</guid><pubDate>Thu, 07 Sep 2017 07:16:12 GMT</pubDate><description>You can skip this step, just add your roles in the main config and it will be just fine.</description></item><item><title>malino on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2692</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2692</guid><pubDate>Thu, 07 Sep 2017 04:30:11 GMT</pubDate><description>I dont understand for first step.

&#92;-&gt; Add file module.acl.roles in application/config/  
– what u mean for this step?

Anyone have tutorial for this for noob?</description></item><item><title>Alexandre on How to destroy all dojo widget nodes</title><link>https://ivangospodinow.com/how-to-destroy-all-dojo-widget-nodes.html#comment-2669</link><guid>https://ivangospodinow.com/how-to-destroy-all-dojo-widget-nodes.html#comment-2669</guid><pubDate>Wed, 28 Dec 2016 12:38:34 GMT</pubDate><description>Man, you save my life!

Thanks from brazil @ Dec / 2016</description></item><item><title>Indrasinh on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2623</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2623</guid><pubDate>Sat, 16 Apr 2016 05:02:12 GMT</pubDate><description>Thanks man!!

You have done awesome job!!

Exactly what I am looking for..</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2621</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2621</guid><pubDate>Wed, 13 Apr 2016 05:21:51 GMT</pubDate><description>Hello Armando,

in view helper try: $this-&gt;getView()-&gt;layout()-&gt;acl</description></item><item><title>Armando Guerra on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2620</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2620</guid><pubDate>Wed, 13 Apr 2016 01:03:37 GMT</pubDate><description>Dear Friend,

I need your help , I need to create a ViewHelper where I am trying to call the method isAllowed () but I have this error.

if ( $ this-&gt; acl- &gt; isAllowed ( ‘ role’ , ‘ permission ‘)) {

Notice: Undefined variable: acl in puedo.php on line 13

Fatal error: Call to a member function isAllowed() on a non-object in puedo.php on line 13

Can you help me.

Armando .</description></item><item><title>Ivan Gospodinow on How to use Zopim chat outside your site.</title><link>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2612</link><guid>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2612</guid><pubDate>Sun, 31 Jan 2016 10:38:53 GMT</pubDate><description>What error do you get? Can you send an example?</description></item><item><title>gumus alyans on How to use Zopim chat outside your site.</title><link>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2611</link><guid>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2611</guid><pubDate>Sun, 31 Jan 2016 07:41:05 GMT</pubDate><description>couldnt get it working on my website…. with both solutions..</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2601</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2601</guid><pubDate>Tue, 24 Nov 2015 17:41:52 GMT</pubDate><description>Sorry for the dupe, but thought might be useful. I also changed the hard coded role setting $userRole = ‘guest’; to values pulled from db:

&#92;`$userRole = $this-&gt;person-&gt;admin ? ‘admin’ : ‘guest’;&#92;`

At any rate, thanks for the tutorial.</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2600</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2600</guid><pubDate>Tue, 24 Nov 2015 17:40:02 GMT</pubDate><description>Awesome tutorial! Thanks for the writeup. Only made some minor changes using &#92;`use&#92;` instead of full path inline since my company has line length restrictions.

Kudos!</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2582</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2582</guid><pubDate>Wed, 15 Jul 2015 07:21:00 GMT</pubDate><description>First, dump this $e-&gt;getViewModel()-&gt;acl-&gt;isAllowed($userRole, $route) and see if your user role is allowed to the route.  
If not check your routes to see if you have the correct one.</description></item><item><title>Bas on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2581</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2581</guid><pubDate>Wed, 15 Jul 2015 07:13:27 GMT</pubDate><description>I am getting e 404 page?  
What do i do wrong?

A 404 error occurred  
Page not found.  
The requested controller was unable to dispatch the request.

Controller:  
Admin&#92;&#92;Controller&#92;&#92;Users  
No Exception available</description></item><item><title>Tong Uyen on How to get zend framework 2 base path with domain name in layout ?</title><link>https://ivangospodinow.com/how-to-get-zend-framework-2-base-path-with-domain-name-in-layout.html#comment-2566</link><guid>https://ivangospodinow.com/how-to-get-zend-framework-2-base-path-with-domain-name-in-layout.html#comment-2566</guid><pubDate>Thu, 12 Mar 2015 10:52:47 GMT</pubDate><description>Thank you very much.</description></item><item><title>King on Adding Custom View Helper In Zend Framework 2</title><link>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2449</link><guid>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2449</guid><pubDate>Wed, 10 Dec 2014 19:48:05 GMT</pubDate><description>Can I pass back a partial or a file with php and html from invoke?</description></item><item><title>Vipul on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2444</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2444</guid><pubDate>Tue, 28 Oct 2014 07:06:53 GMT</pubDate><description>Hi Ivan,

Please check [http://pastebin.com/xjdjZjGp](http://pastebin.com/xjdjZjGp)

When I set $userRole = ‘guest’; and when I call route sponsor&#92;_login, I was able to see login page. But when I changed $userRole = ‘sponsor’ and called same sponsor&#92;_login page, page says The page isn’t redirecting properly. What’s wrong here. As per my requirement. It should be redirected to sponsor&#92;_home page if role is set to sponsor. Could you please suggest something.

Thanks,  
Vipul</description></item><item><title>Vipul on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2443</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2443</guid><pubDate>Tue, 28 Oct 2014 04:40:27 GMT</pubDate><description>I think I need to redirect it according to the sessions (like sponsor for sponosr module and users for users module) , session will contain the role and these functions (initAcl(), checkACL()) will be defined in one of the three modules only once and that will make it possible for other modules to work automatically.</description></item><item><title>Vipul on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2442</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2442</guid><pubDate>Tue, 28 Oct 2014 04:36:21 GMT</pubDate><description>Hi Ivan,

Yes I have defined three different roles, my concern is that if guest user will access sponsor module’s actions then it must redirect to sponsor’s login page otherwise if some one is accessing some other module like users module then it should redirect it to user’s login page. How would I be able to do that. Different redirection according to different modules and different roles?

Thanks,  
Vipul</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2441</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2441</guid><pubDate>Mon, 27 Oct 2014 13:05:59 GMT</pubDate><description>Hello Vipul,

this is bad idea. Just make another role that combines the two of them.</description></item><item><title>Vipul on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2440</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2440</guid><pubDate>Mon, 27 Oct 2014 13:04:07 GMT</pubDate><description>Hi,

How to manage if I have session from two roles. How would I be able to set

//you set your role  
$userRole = ‘guest’;

and if I have three modules, one users module, sponsors module and admin module. Then do I have to copy onbootstrap initalization of initAcl() for each module separately. Is it possible that I can specify $userRole statically inside each module’s onbootstrap. How will it work.

Thanks,  
Vipul</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2436</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2436</guid><pubDate>Wed, 15 Oct 2014 08:05:12 GMT</pubDate><description>Hello Jaiuad,

the tutorial already exists: [http://ivangospodinow.com/zend-framework-2-navigation-with-acl/](/zend-framework-2-navigation-with-acl.html)  
cheers.</description></item><item><title>Jaouad on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2435</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2435</guid><pubDate>Wed, 15 Oct 2014 07:18:04 GMT</pubDate><description>Hi ivan, thank you for your helpful tutorial.  
I have 3 roles : guest, member, admin.  
I have also a menu in the layout that is controlled by the acl.  
My question is how could I display only the permitted links using the navigation.  
It would be very appreciated if you could give me a step by step tutorial.  
Thanks</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2407</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2407</guid><pubDate>Sun, 31 Aug 2014 17:39:33 GMT</pubDate><description>resource parameter is part of the navigation config.

if (strpos($route, ‘/’) !== false) {  
$route = explode(‘/’, $route)&#92;[0&#92;];  
}

route patch is for the access control.</description></item><item><title>King on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2406</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2406</guid><pubDate>Sun, 31 Aug 2014 17:20:20 GMT</pubDate><description>What file do you put resource=’products’ in? That is the part I am confused on. module.config.php? In the router?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2405</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2405</guid><pubDate>Sun, 31 Aug 2014 17:06:43 GMT</pubDate><description>You have to have resource = ‘products’ on all items that you want to be accesable thrue products ACL rule</description></item><item><title>King on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2404</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2404</guid><pubDate>Sun, 31 Aug 2014 17:04:12 GMT</pubDate><description>Thank you for the help so far. I only have menu items for the main route. All the child routes dont have menu items. What do I do then?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2403</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2403</guid><pubDate>Sun, 31 Aug 2014 15:00:00 GMT</pubDate><description>You add resource = ‘products’ in all menu items that are sub to products.  
Then add in checkAcl

if (strpos($route, ‘/’) !== false) {  
$route = explode(‘/’, $route)&#92;[0&#92;];  
}

this way you will get only the main route.</description></item><item><title>King on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2402</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2402</guid><pubDate>Sun, 31 Aug 2014 14:47:52 GMT</pubDate><description>What if I just want to control the root route for an entire module and have all the sub routes inherited? Can I just control access to one route and the rest is good?

Example: [http://ipaddress/products](http://ipaddress/products)  
I give access to /products and then

[http://ipaddress/products/view](http://ipaddress/products/view)  
[http://ipaddress/products/edit](http://ipaddress/products/edit)  
[http://ipaddress/products/subproducts/view](http://ipaddress/products/subproducts/view)  
[http://ipaddress/products/page/2](http://ipaddress/products/page/2)

are all allowed to access because I gave access to the root route.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2383</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2383</guid><pubDate>Mon, 11 Aug 2014 19:33:15 GMT</pubDate><description>When you add Location : $url – Yes</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2382</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2382</guid><pubDate>Mon, 11 Aug 2014 19:24:59 GMT</pubDate><description>does addHeaderLine() handle redirecting?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2381</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2381</guid><pubDate>Mon, 11 Aug 2014 19:20:31 GMT</pubDate><description>So your mistake is: you put header to redirect in the module.php and then in the controller you again request to redirect which is not possible.</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2380</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2380</guid><pubDate>Mon, 11 Aug 2014 19:15:58 GMT</pubDate><description>public function indexAction()  
{

if (!$user = $this-&gt;identity()) {  
return $this-&gt;redirect()-&gt;toUrl(‘/login/log’);  
}

$user = $this-&gt;identity();

$main&#92;_layout = $this-&gt;layout();

$main&#92;_layout-&gt;setVariable(‘user1’, $user-&gt;username);

return new ViewModel(array(‘user1’ =&gt; $user-&gt;username));  
}

I am assuming that this in the application controller is causing the issue. Clueless though on how to make this work in both the module.php and the controller 🙁</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2379</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2379</guid><pubDate>Mon, 11 Aug 2014 19:07:49 GMT</pubDate><description>So like this?

$e-&gt;stopPropagation();  
$response = $e-&gt;getResponse();

$response-&gt;getHeaders()-&gt;addHeaderLine(‘Location’, $e-&gt;getRequest()-&gt;getBaseUrl() . ‘/login/log’);</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2378</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2378</guid><pubDate>Mon, 11 Aug 2014 19:04:24 GMT</pubDate><description>Try to add $e-&gt;stopPropagation();  
I think you can have an error in the controller because it is still executed.</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2377</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2377</guid><pubDate>Mon, 11 Aug 2014 18:58:58 GMT</pubDate><description>One more question, although it may be outside the scope of this tutorial, but I’m using Zend&#92;&#92;Authentication to determine if the identity is valid and if it isn’t, redirect but I cannot get it to redirect to the login page. Here is my code for it:

public function checkAcl(MvcEvent $e)  
{  
$route = $e-&gt;getRouteMatch()-&gt;getMatchedRouteName();

$auth = new AuthenticationService();

$user&#92;_role = $auth-&gt;hasIdentity() ? $auth-&gt;getIdentity() : null;

if (!$e-&gt;getViewModel()-&gt;acl- &gt;isAllowed($user&#92;_role-&gt;username, $route)) {  
$response = $e-&gt;getResponse();

$response-&gt;getHeaders()-&gt;addHeaderLine(‘Location’, $e-&gt;getRequest()-&gt;getBaseUrl() . ‘/login/log’);  
//$response-&gt;setStatusCode(404);  
}  
}

but it’s only giving me a 500 server error.. how would this be fixed so it would redirect in a right way?

Thanks again</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2376</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2376</guid><pubDate>Mon, 11 Aug 2014 18:02:59 GMT</pubDate><description>yes, thanks 🙂</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2375</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2375</guid><pubDate>Mon, 11 Aug 2014 17:56:43 GMT</pubDate><description>Sure you can use Zend&#92;&#92;Session or $&#92;_SESSION  
For example  
if (isset($&#92;_SESSION&#92;[‘logged&#92;_user&#92;_role’&#92;])) {  
$user&#92;_role = $&#92;_SESSION&#92;[‘logged&#92;_user&#92;_role’&#92;];  
} else {  
$user&#92;_role = ‘guest’;  
}

is it clear for you ?</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2374</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2374</guid><pubDate>Mon, 11 Aug 2014 17:53:07 GMT</pubDate><description>My main question is how would I not have to hard code a value into $user&#92;_role in favor of something that is dynamically generated. Does that make sense?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2373</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2373</guid><pubDate>Mon, 11 Aug 2014 17:52:04 GMT</pubDate><description>Yes

Then replace in initAcl

// this  
$roles = include &#92;_&#92;_DIR&#92;_&#92;_ . ‘/config/module.acl.roles.php’;  
// with  
$roles = $this-&gt;getDbRoles($e);</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2372</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2372</guid><pubDate>Mon, 11 Aug 2014 17:50:15 GMT</pubDate><description>So I wouldn’t need the module.acl.roles.php file anymore?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2371</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2371</guid><pubDate>Mon, 11 Aug 2014 17:45:52 GMT</pubDate><description>Hello Jimmy and thank you,

to your question – yes, you should still follow the rest of the code 🙂  
the db only replaces the array of roles coming from the file.</description></item><item><title>Jimmy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2370</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2370</guid><pubDate>Mon, 11 Aug 2014 17:44:09 GMT</pubDate><description>Hello,

First, thanks for this awesome tutorial! :).

My question is that if I use a db for the acl roles, do I still need to use the checkAcl method and attach it in the onBootstrap() method or would checkAcl be taken out in favor of dbRoles()?

Thanks</description></item><item><title>Alexander on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2352</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2352</guid><pubDate>Thu, 31 Jul 2014 21:21:53 GMT</pubDate><description>This is the best tutorial on Zend Framework ACL ever. Put up a bitcoin address and I will literally pay you. Shame on the rest for not writing a tutorial that adequately explained it all out like this.</description></item><item><title>Joseph on Adding Custom View Helper In Zend Framework 2</title><link>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2303</link><guid>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2303</guid><pubDate>Mon, 21 Jul 2014 08:21:41 GMT</pubDate><description>I did a small change in the step 2:

return new View&#92;&#92;Helper&#92;&#92;GetSiteUrl();

It works fine after that for me.

Thank you for your great post.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2268</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2268</guid><pubDate>Fri, 18 Jul 2014 12:19:52 GMT</pubDate><description>Hello lodi,

can you paste some code?</description></item><item><title>lodi on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2267</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2267</guid><pubDate>Fri, 18 Jul 2014 12:00:44 GMT</pubDate><description>Hi Ivan thanks for the reply.

I changed the code as per edit 1 and still get the same error.

For my clarity the module.acl.roles file do I put it in the module/Application folder or in the top level config folder ?

Also you mention the acl config file? not sure if I need to create the file or if it is the file that comes with the framework.

Really trying to get this to work.

Regards

L</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2266</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2266</guid><pubDate>Fri, 18 Jul 2014 09:49:41 GMT</pubDate><description>Hello Andy,

the way I am showing it in the post is: $e -&gt; getViewModel() -&gt; acl = $acl;  
This means that you can access it in any view.  
The right way to do this is: **create ACL factory** via the service manager and then use it to check wherever needed.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2265</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2265</guid><pubDate>Fri, 18 Jul 2014 09:47:30 GMT</pubDate><description>Dear lodi,  
check Edit 1 from the post above.</description></item><item><title>lodi on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2264</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2264</guid><pubDate>Fri, 18 Jul 2014 09:45:10 GMT</pubDate><description>Hi I get the following error

Fatal error: Uncaught exception ‘Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Exception&#92;&#92;InvalidArgumentException’ with message ‘Resource ‘users’ not found’ in /home/lodi/git/reporting/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php on line 292

any pointers ?

Regards</description></item><item><title>Andy on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2248</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2248</guid><pubDate>Mon, 14 Jul 2014 21:28:44 GMT</pubDate><description>Hi,

This is a excellent, crisp and really good understandable tutorial, thank you for that !!

I am just on the search how to enhance this to be able to ask for certain privileges in a view without moving the whole part again into a View Helper or similar.

So, somehow centralize the functionality for checkACL and let this be accessible from other locations as well.

Any idea for that ?</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2226</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2226</guid><pubDate>Mon, 07 Jul 2014 15:17:58 GMT</pubDate><description>thank you a lot! now it work! 🙂</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2225</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2225</guid><pubDate>Mon, 07 Jul 2014 14:38:06 GMT</pubDate><description>Hello Matteo,

in this case I understand what you need to ask.  
Then your check will be with the route name, not the whole url.

Just do:  
if($this-&gt;layout()-&gt;acl-&gt;isAllowed($dato&#92;[“ruolo”&#92;], ‘utente’)) {  
echo $this-&gt;url(‘utente’); // assuming that index action is by default.  
// or whatever here.  
}

And dont forget to test if the resource is existing like I posted before:  
$this-&gt;layout()-&gt;acl -&gt;hasResource(‘utente’)</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2224</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2224</guid><pubDate>Mon, 07 Jul 2014 14:02:42 GMT</pubDate><description>Dear Ivan,  
thanks for your patience.

Sorry but, I haven’t shown all the file module.acl.roles.php.  
This file contains:

$guest = array(‘homes’,’auth’);  
$utente = array(‘homes’,’auth’,’success’,’DownloadFile’,’utente:show’,’utente:upload’);  
$admin = array(‘homes’,’auth’,’success’,’compagnia’,’utente’,’DownloadFile’);  
$superadmin = array(‘homes’,’auth’,’success’,’compagnia’,’utente’,’DownloadFile’);

return array(‘superadmin’=&gt;$superadmin,’utente’=&gt;$utente,’admin’=&gt;$admin,’guest’=&gt;$guest);

The menu display pages correctly according to the role.  
When I try to call the link from view with this syntax:

if($this-&gt;layout()-&gt;acl-&gt;isAllowed($dato&#92;[“ruolo”&#92;],$this-&gt;url(‘utente’, array(‘action’=&gt;’index’))))

I get the error:

Resource ‘/utente’ not found

If I duplicate “/utente” with the slash in the permits, it works. How so? Can I avoid duplicate all the permits? If I leave only “/utente” do not work the action

thank you very much</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2223</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2223</guid><pubDate>Mon, 07 Jul 2014 10:05:58 GMT</pubDate><description>Hello Matteo,

you do not have to repeat it.  
If you want user to have access to url ‘/user’, then from your example:  
add to $user = &#92;[‘/user’&#92;];

Then check the in the view:  
$this-&gt;layout()-&gt;acl -&gt;hasResource($url) &amp;&amp; $this-&gt;layout()-&gt;acl-&gt; isAllowed(‘user’, $url)</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2222</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2222</guid><pubDate>Mon, 07 Jul 2014 09:38:38 GMT</pubDate><description>I’m sorry, but in module.acl.roles I’ve just added this role

$admin = array(‘/’,’homes’,’auth’,’success’,’user’);

return array(‘user’=&gt;$user,’admin’=&gt;$admin,’guest’=&gt;$guest);

I need to repeat it?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2221</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2221</guid><pubDate>Mon, 07 Jul 2014 09:26:34 GMT</pubDate><description>Hello Matteo,

in your code you are asking the acl object, if the user with role(some role) have access to url (for example /user) but to this moment you never told the acl object, that resource ‘/user’ exists and that user role has access to it.

@TODO  
$acl -&gt; addResource(new &#92;&#92;Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Resource&#92;&#92;GenericResource(‘/user’));  
$acl -&gt; allow(‘user&#92;_role’ , ‘/user’);

Is it now more clear?</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2220</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2220</guid><pubDate>Mon, 07 Jul 2014 09:20:28 GMT</pubDate><description>sorry, is not so clear.  
We have just add a resource to use it with side menu. Is not enought? I need to add in some other way?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2219</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2219</guid><pubDate>Mon, 07 Jul 2014 09:13:11 GMT</pubDate><description>Hello Matteo,

quote from above ‘add the links as resources’.  
So you should add the link as resource and add the user role permission.  
Is it clear to you ?</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2218</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2218</guid><pubDate>Mon, 07 Jul 2014 09:06:55 GMT</pubDate><description>another question:  
If I wrote this:  
echo $this-&gt;layout()-&gt;acl-&gt;isAllowed($user-&gt;role,$this-&gt;url(‘user’, array(‘action’=&gt;’index’)));

I get an error: Resource ‘/user’ not found

where am I doing wrong?</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2217</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2217</guid><pubDate>Mon, 07 Jul 2014 07:11:16 GMT</pubDate><description>I thought about the navigation, but I need to add many links scattered around the page, and it seemed too complex. I think I’ll try the dirty way 🙂

thank you very much</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2194</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2194</guid><pubDate>Sat, 05 Jul 2014 13:38:27 GMT</pubDate><description>Hello kourosh,

can you paste some code? The acl tutorial, only redirects if person does not have permission to access the current page. The opposite, why to redirect if he can see the page? Right ?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2193</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2193</guid><pubDate>Sat, 05 Jul 2014 12:47:07 GMT</pubDate><description>Hello Matteo,  
the best way will be to create navigation for the links.  
If you prefer the lazy way, you can add the links as resources in the acl and then check from the view (not a good way to do it) with $this-&gt;layout()-&gt;acl-&gt;isAllowed(‘user&#92;_role’, $linkl);

@BTW,  
you can add an menu item in your current navigation and add sub pages. Then you can render only the sub pages of this item, and the acl will work by default.</description></item><item><title>kourosh on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2192</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2192</guid><pubDate>Sat, 05 Jul 2014 12:45:44 GMT</pubDate><description>Hello Ivan.

Thanks for nice article, i have a little problem, the application dont redirect to route after granted permission, it just stop and look at me 😐</description></item><item><title>Ivan Gospodinow on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2191</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2191</guid><pubDate>Sat, 05 Jul 2014 12:36:08 GMT</pubDate><description>Hello,  
the user role, most of the times is stored in the user object, right?  
Then you can have a new instance of Zend&#92;&#92;Session and get your current user.  
If user does not exists in the session, then the role can be guest.</description></item><item><title>kourosh on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2190</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2190</guid><pubDate>Sat, 05 Jul 2014 11:37:49 GMT</pubDate><description>Hello, nice article, thank you.

but i’m wondering how to pass user role to checkAcl function in module class ?

In previous article we do like this:

$route = $e-&gt;getRouteMatch()-&gt;getMatchedRouteName();

$userRole = ‘member’;

if (!$e-&gt;getViewModel()-&gt;acl-&gt;isAllowed($userRole, $route))  
.  
.  
.

But how do it in this way ?</description></item><item><title>Matteo on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2189</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2189</guid><pubDate>Fri, 04 Jul 2014 15:45:38 GMT</pubDate><description>I need to print some links in the view, according to the user’s permissions. How can I do it? I tried using $acl = $this-&gt;acl but in the view I get a null. How can I do it? There is another method of verifying user permissions in the view?</description></item><item><title>Phil on Adding Custom View Helper In Zend Framework 2</title><link>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2179</link><guid>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-2179</guid><pubDate>Wed, 18 Jun 2014 14:52:09 GMT</pubDate><description>Line 3 needs an echo statement for it to display anything 🙂

echo $this-&gt;sayHello(‘Ivan Gospodinow’);</description></item><item><title>Webdevilopers (@webdevilopers) on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2173</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-2173</guid><pubDate>Thu, 05 Jun 2014 07:15:02 GMT</pubDate><description>@Micheal Wilkinson:  
If you need to check permissions on page in your partial you can use the accept() method:

foreach ($this-&gt;container as $page){  
if($this-&gt;navigation()-&gt;accept($page)) {  
echo $this-&gt;navigation()-&gt;menu()-&gt;htmlify($page);  
}  
}

Source: [http://blog.webdevilopers.net/checking-acl-in-zend-navigation-when-using-custom-view-script/](http://blog.webdevilopers.net/checking-acl-in-zend-navigation-when-using-custom-view-script/)</description></item><item><title>Adrian on Change layout template based on controller in Zend Framework 2</title><link>https://ivangospodinow.com/change-layout-template-based-on-controller-in-zend-framework-2.html#comment-2161</link><guid>https://ivangospodinow.com/change-layout-template-based-on-controller-in-zend-framework-2.html#comment-2161</guid><pubDate>Thu, 15 May 2014 08:52:25 GMT</pubDate><description>Thank you so much! It worked perfectly! 🙂 I have an AdminController in my project that would use a different layout and your post is exactly what I needed. Got tired of specifying the layout in every damn action of the Controller. It just felt inappropiate to do that over and over again.</description></item><item><title>Renato Junior on How to use Zopim chat outside your site.</title><link>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2146</link><guid>https://ivangospodinow.com/how-to-use-zopim-chat-outside-your-site.html#comment-2146</guid><pubDate>Tue, 01 Apr 2014 09:25:44 GMT</pubDate><description>Hi! On step 2 try this with latest version of Zopim:

iframe#zopim {  
height: 30px;  
width: 250px;  
frameborder: 0;  
border: 0;  
position:fixed;  
bottom:0;  
right:0;  
overflow: hidden;  
background:transparent;  
z-index: 10000;  
scrolling: no;  
}

$(window).load(function(){

function ZopimCheck() {

var $Zopim = $(“#zopim”);  
var $ZopimChatClose = $Zopim.contents().find(‘.zopim:eq(0)’);

if ( $ZopimChatClose.is(‘:hidden’) ) $Zopim.height(340);  
else $Zopim.height(30);

}

$(‘body’).on(‘hover’,’#zopim’,function(){ ZopimCheck(); });

ZopimCheck();

});</description></item><item><title>Hotlikecold on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-2128</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-2128</guid><pubDate>Mon, 17 Mar 2014 23:12:04 GMT</pubDate><description>I use a srcipt that generates hundreds of thousands of pages automatically. I was using WP Supercache but my server was not able to keep up with cleaning out stale files because there were way too many files. I was manually clearing my cache daily and running into memory errors everytime.

I needed a solution. This plugin is it. I am amazed. I have 100,000’s of dynamically generated pages in my site yet my pages are loading very quickly and are always fresh.

Thank you so much.</description></item><item><title>Dennis on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2115</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-2115</guid><pubDate>Tue, 31 Dec 2013 08:24:32 GMT</pubDate><description>The “redirect on error” logic is missing the following part:  
$response-&gt;sendHeaders();  
$e-&gt;stopPropagation();

Otherwise, the restricted controller/action is still called.</description></item><item><title>Salem on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1973</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1973</guid><pubDate>Mon, 04 Nov 2013 03:27:55 GMT</pubDate><description>Nice Plugin I test it and work like charm .  
I Already Tried WP Super Cache And W3 Total Cache and both create a lot of problems to may blog .  
I was looking for simple caching Plugins and I finally found it .  
You make really nice Plugin .</description></item><item><title>Pragnesh Karia on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1900</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1900</guid><pubDate>Thu, 24 Oct 2013 17:08:48 GMT</pubDate><description>Hello Ivan,

Any more updates on the above , your help is highly appreciated.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1788</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1788</guid><pubDate>Fri, 18 Oct 2013 09:34:23 GMT</pubDate><description>Hello Pragnesh Karia,

you are right , we do not need role&#92;_privileges.I will fix that.  
For your database schema , you need at least user&#92;_role and resource. See the config array in the post.  
I will update the code to 404. I agree that its the right way!

Thank you for you appinion.</description></item><item><title>Pragnesh Karia on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1787</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1787</guid><pubDate>Thu, 17 Oct 2013 11:34:24 GMT</pubDate><description>Hey ,

Thanks for sharing a wonderful script.

Can you please explain more in terms of ,

“SELECT &#92;* FROM acl ORDER BY role&#92;_privileges DESC”

what will be ACL table schema?

what is the use of setstatuscode = 303 ?

i want to redirect the to 403 access forbidden page (403.phtml)

$response -&gt; getHeaders() -&gt; addHeaderLine(‘Location’, $e -&gt; getRequest() -&gt; getBaseUrl() . ‘/404’);  
$response -&gt; setStatusCode(303);

Any help would be appreciated.</description></item><item><title>RK on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1785</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1785</guid><pubDate>Wed, 09 Oct 2013 12:59:58 GMT</pubDate><description>Thank you very much!</description></item><item><title>Ivan Gospodinow on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1784</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1784</guid><pubDate>Tue, 08 Oct 2013 21:01:05 GMT</pubDate><description>Hello RK,  
you can add a factory for the navigation like this:

Go to config -&gt; service&#92;_manager -&gt; factories  
Add ‘AdminNavigation’ =&gt; ‘Application&#92;&#92;Factory&#92;&#92;AdminNavigation’

Then in that file you have :  
class AdminNavigation extends Zend&#92;&#92;Navigation&#92;&#92;Service&#92;&#92;AbstractNavigationFactory  
{  
function getName()  
{  
return ‘admin&#92;_menu’;  
}  
}

Then you go to your navigation array and add key : ‘admin&#92;_menu’ and its pages array.

Got it ?</description></item><item><title>RK on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1782</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1782</guid><pubDate>Tue, 08 Oct 2013 08:54:43 GMT</pubDate><description>Other excellent tutorial, thank you so much. But how can I create another menu – for back end for example. Thanks in advance!</description></item><item><title>Ivan Gospodinow on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1761</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1761</guid><pubDate>Wed, 18 Sep 2013 05:42:48 GMT</pubDate><description>Hello Atanas ,  
can you please check if your cache folder exists. Most probably this is the problem.  
If it does not work , can you restart the plugin and see what will happen ?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1760</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1760</guid><pubDate>Wed, 18 Sep 2013 05:40:38 GMT</pubDate><description>Hello Bartek ,  
you can change the layout with one that dispatches json/xml to tell the page that user do not have permissions to access it.</description></item><item><title>bartek on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1757</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1757</guid><pubDate>Sun, 15 Sep 2013 21:57:38 GMT</pubDate><description>Hi, can it be done without redirection? I am developing restful application, and there are no restrictions available.  
Regards</description></item><item><title>Kumar on How to count days between 2 dates in php</title><link>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1743</link><guid>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1743</guid><pubDate>Tue, 03 Sep 2013 12:09:46 GMT</pubDate><description>Hello Ivan,  
Sorry for posting the questions here?  
How could i integrate v.me visa payment in php?  
Can you expalain with the steps and code? I am totally confused by that?  
Can you post some example code sir?  
Thank You</description></item><item><title>Atanas on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1737</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1737</guid><pubDate>Wed, 28 Aug 2013 19:32:25 GMT</pubDate><description>Ivan,  
I have problem with your plugin, I can not display my home page I get following :

Warning: fopen(/home/beckeran/public&#92;_html/wp-content/cache/ig&#92;_cache/42099b4af021e53fd8fd4e056c2568d7c2e3ffa8.cache) &#92;[function.fopen&#92;]: failed to open stream: No such file or directory in /home/beckeran/public&#92;_html/wp-content/plugins/ivan-gospodinow-cache/classes/ig&#92;_class&#92;_cache.php on line 56

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/beckeran/public&#92;_html/wp-content/plugins/ivan-gospodinow-cache/classes/ig&#92;_class&#92;_cache.php on line 57

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/beckeran/public&#92;_html/wp-content/plugins/ivan-gospodinow-cache/classes/ig&#92;_class&#92;_cache.php on line 58

Would you please help me with that?</description></item><item><title>Grisou on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1736</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1736</guid><pubDate>Wed, 28 Aug 2013 09:22:30 GMT</pubDate><description>To handle also allow and deny permissions I change this:

Configs acl:  
// true to allow, false to deny  
return array(  
‘guest’=&gt; array(  
‘home’ =&gt; true,  
‘login’ =&gt; true,  
‘register’ =&gt; true  
),  
‘admin’=&gt; array(  
‘admin’ =&gt; true,  
‘add-user’ =&gt; true,  
‘delete-user’ =&gt; true,  
‘login’ =&gt; false,  
‘register’ =&gt; false  
),  
);

And into Module.php:  
public function initAcl(MvcEvent $e)  
{  
$acl = new Acl();  
$acl-&gt;deny();  
$roles = include &#92;_&#92;_DIR&#92;_&#92;_ . ‘/config/module.acl.roles.php’;  
$allResources = array();  
foreach ($roles as $role =&gt; $resources) {

$role = new &#92;&#92;Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Role&#92;&#92;GenericRole($role);  
$acl-&gt;addRole($role);

$allResources = array&#92;_merge($allResources, $resources);

//adding resources  
foreach ($resources as $resourceName =&gt; $resourceAllowed ) {  
if(!$acl-&gt;hasResource($resourceName)) {  
$acl-&gt;addResource(new &#92;&#92;Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Resource&#92;&#92;GenericResource($resourceName));  
}  
}

//adding restrictions  
foreach ($allResources as $resourceName =&gt; $isResourceAllowed ) {

if ( $isResourceAllowed ) {  
$acl-&gt;allow($role, $resourceName);  
} else {  
$acl-&gt;deny($role, $resourceName);  
}  
}  
}

//setting to view  
$e-&gt;getViewModel()-&gt;acl = $acl;

}</description></item><item><title>Ivan Gospodinow on How to count days between 2 dates in php</title><link>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1733</link><guid>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1733</guid><pubDate>Fri, 23 Aug 2013 13:38:02 GMT</pubDate><description>Hello Kumar,  
if you are counting future dates you need the first day too. So the function is counting right. DateInterval is used as an representation of time. If you want to add 10 days to date time you use new &#92;&#92;DateInterval(‘P10D’). See more on [http://php.net/manual/en/class.dateinterval.php](http://php.net/manual/en/class.dateinterval.php)</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1732</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1732</guid><pubDate>Fri, 23 Aug 2013 13:32:35 GMT</pubDate><description>Hello Kumar,

you should not know about getServiceLocator in any view or view helper!</description></item><item><title>Kumar on How to count days between 2 dates in php</title><link>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1731</link><guid>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1731</guid><pubDate>Fri, 23 Aug 2013 13:31:57 GMT</pubDate><description>Hi Ivan,  
How does the DateInterval() works?  
Thanks</description></item><item><title>Kumar on How to count days between 2 dates in php</title><link>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1730</link><guid>https://ivangospodinow.com/how-to-count-days-between-2-dates-in-php.html#comment-1730</guid><pubDate>Fri, 23 Aug 2013 13:26:01 GMT</pubDate><description>Hello Ivan,  
When we find difference between these days ‘2013-03-01′,’2013-03-11’ without last day, i think the results may be 9 starts from 2nd day to 10th day(in this example)(I am not sure about that sir Please Help me)</description></item><item><title>Kumar on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1729</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1729</guid><pubDate>Fri, 23 Aug 2013 13:01:21 GMT</pubDate><description>Can I know about get ServiceLocator(), viewhelpermanager ?</description></item><item><title>Kumar on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1728</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1728</guid><pubDate>Fri, 23 Aug 2013 12:58:00 GMT</pubDate><description>Thanks Ivan</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1727</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1727</guid><pubDate>Fri, 23 Aug 2013 11:30:08 GMT</pubDate><description>Hello Kumar ,

getApplication return the Zend Mvc Application object, which is instantiated in index.php. It is basically the whole application.  
getEventManager is the object which can store and trigger events. See EventManager::attach() and EventManager::trigger();</description></item><item><title>Kumar on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1725</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1725</guid><pubDate>Fri, 23 Aug 2013 09:53:21 GMT</pubDate><description>Hi Ivan,

Nice Tutorial.  
As I am a Beginner,  
Can You tell me the use of get Application() and get EventManager()?  
Thank You</description></item><item><title>Kathiravan on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1599</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1599</guid><pubDate>Thu, 25 Jul 2013 06:07:38 GMT</pubDate><description>Hello Ivan,

Sorry by mistake i posted the above comment Thanks its working now.</description></item><item><title>Kathiravan on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1598</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1598</guid><pubDate>Thu, 25 Jul 2013 05:00:56 GMT</pubDate><description>Hi Ivan,

There is no edit 4 displayed here.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1591</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1591</guid><pubDate>Wed, 24 Jul 2013 13:25:55 GMT</pubDate><description>Hello Kathiravan ,

please take a look at Edit 4. Made it for you.</description></item><item><title>Kathiravan on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1589</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1589</guid><pubDate>Wed, 24 Jul 2013 11:47:41 GMT</pubDate><description>Hello Ivan,

i have three types of users admin, guest and user, have a page like login and register. here the three users will access the above pages  
return array(  
‘guest’=&gt; array(  
‘add-user’,  
‘login’  
),  
‘admin’=&gt; array(  
‘user-list’,  
‘login’  
),  
‘user’=&gt; array(  
‘add-user’,  
‘login’  
),  
);

but it shows the error Uncaught exception ‘Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Exception&#92;&#92;InvalidArgumentException’ with message ‘Resource id ‘login’ already exists in the ACL’ everything works fine except this plz help.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1583</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1583</guid><pubDate>Wed, 24 Jul 2013 06:44:14 GMT</pubDate><description>Hello S.G. ,

basically checkAcl is called when route is initialised. We need this because acl roles are based on routes/resources (in other word – links).Then what we do is : get the current route name (you can add up action , controller and/or parameters) as a string and ask the acl class if user with role (exp. guest) can access this string (exp. login).

Simple enought for you?</description></item><item><title>S.G. on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1575</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1575</guid><pubDate>Tue, 23 Jul 2013 16:24:33 GMT</pubDate><description>Hi Ivan,  
thanks for your sharing.

I am confused about the “function checkAcl()” above.  
I had try to set myself file “module.acl.roles.php”, but my ACL seems not work.  
Would you explain the function checkAcl() more detail, and the purpose of line 39, “$userRole = ‘guest’;” ?

Appriciate</description></item><item><title>Ivan Gospodinow on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1568</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1568</guid><pubDate>Mon, 22 Jul 2013 17:28:04 GMT</pubDate><description>Hello Jose ,  
the cache plugin is loads independently of wordpress (before the wordpress) so the answer of your question is yes.You can use it with other cache plugins.</description></item><item><title>Jose on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1567</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-1567</guid><pubDate>Mon, 22 Jul 2013 14:22:14 GMT</pubDate><description>Hello dear, I like me know if compatible with DB Cache Reload or similar database cache plugins, thanks for support</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1537</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1537</guid><pubDate>Thu, 18 Jul 2013 06:05:40 GMT</pubDate><description>Hello Prakash ,

thank you for your question. I added edit3 to the article to give some idea of how to do it with a database.</description></item><item><title>Prakash on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1536</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1536</guid><pubDate>Thu, 18 Jul 2013 05:35:48 GMT</pubDate><description>Hi,

Thanks for this great tutorial.

What in case, if i have to implement Zend2 ACL using Database define roles and access.

Can you please help to implement acl using database. i search many links on google but no success on it.

Thanks…</description></item><item><title>Ivan Gospodinow on Adding Custom View Helper In Zend Framework 2</title><link>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-1520</link><guid>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-1520</guid><pubDate>Tue, 09 Jul 2013 08:47:46 GMT</pubDate><description>Hello anil,

can you be a litthe more specific because I can not understand what is the problem.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1519</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1519</guid><pubDate>Tue, 09 Jul 2013 08:46:05 GMT</pubDate><description>Hello sandeep,

it dont matter if the request is ajax.  
You should specify resouce(route) and user to access it in the acl.  
Module.php is executed every time.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1518</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1518</guid><pubDate>Tue, 09 Jul 2013 08:36:22 GMT</pubDate><description>Hello mhor ,

two reasons to give you 404  
1&#92;. Resource is not added to the acl  
2&#92;. User is not allowed to access the resource.

To your other question, you can easy access the session at that point and get the user credentials.If session does not exist you can assume that user is guest.</description></item><item><title>mhor on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1517</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1517</guid><pubDate>Tue, 09 Jul 2013 07:46:00 GMT</pubDate><description>(Noob question here) Just want to ask, how do you pass the role (line 39)?

Tried it already but it always gives me a 404. But when I specify the //, it works normally</description></item><item><title>adam on How to get zend framework 2 base path with domain name in layout ?</title><link>https://ivangospodinow.com/how-to-get-zend-framework-2-base-path-with-domain-name-in-layout.html#comment-1482</link><guid>https://ivangospodinow.com/how-to-get-zend-framework-2-base-path-with-domain-name-in-layout.html#comment-1482</guid><pubDate>Fri, 28 Jun 2013 11:45:19 GMT</pubDate><description>Man thanks for that! I was about to dig into Url helper/plugin class to look it up but found it first here.</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1474</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1474</guid><pubDate>Tue, 25 Jun 2013 17:43:29 GMT</pubDate><description>Hello Tahmina ,

in my example I am using route name as an acl resource.  
In your case you can do the following :

$routeName = $e-&gt;getRouteMatch()-&gt;getMatchedRouteName();  
$routeParams = $e-&gt;getRouteMatch()-getParams();

where route params are you root constraints – for example :  
$customResource = $routeName . $routeParams&#92;[‘controller’&#92;] . $routeParams&#92;[‘action’&#92;];

Than you check like this :  
$acl -&gt; isAllowed($userRole, $customResource);

Simple as that.</description></item><item><title>Tahmina Khatoon on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1473</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1473</guid><pubDate>Tue, 25 Jun 2013 05:08:49 GMT</pubDate><description>Thanks for nice tutorial, It is working fine everywhere except pagination with search. Would you please help me to set permission for following route.

‘people’ =&gt; array(  
‘type’ =&gt; ‘segment’,  
‘options’ =&gt; array(  
‘route’ =&gt; ‘/people&#92;[/:action&#92;]&#92;[/:id&#92;]&#92;[/page/:page&#92;]&#92;[/order&#92;_by/:order&#92;_by&#92;]&#92;[/:order&#92;]&#92;[/search&#92;_by/:search&#92;_by&#92;]’,  
‘constraints’ =&gt; array(  
‘action’ =&gt; ‘(?!&#92;&#92;bpage&#92;&#92;b)(?!&#92;&#92;border&#92;_by&#92;&#92;b)(?!&#92;&#92;bsearch&#92;_by&#92;&#92;b)&#92;[a-zA-Z&#92;]&#92;[a-zA-Z0-9&#92;_-&#92;]&#92;*’,  
‘id’ =&gt; ‘&#92;[0-9&#92;]+’,  
‘page’ =&gt; ‘&#92;[0-9&#92;]+’,  
‘order&#92;_by’ =&gt; ‘&#92;[a-zA-Z&#92;]&#92;[a-zA-Z0-9&#92;_-&#92;]&#92;*’,  
‘order’ =&gt; ‘ASC|DESC’,  
),  
‘defaults’ =&gt; array(  
‘controller’ =&gt; ‘WebApp&#92;&#92;Controller&#92;&#92;People’,  
‘action’ =&gt; ‘index’,  
),  
),  
),

I have allowed ‘people’ for guest but it is not working with order&#92;_by and search&#92;_by parameters.

Please help me.

Thanks in advance</description></item><item><title>Ivan Gospodinow on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1472</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1472</guid><pubDate>Mon, 24 Jun 2013 15:36:47 GMT</pubDate><description>Hello Micheal ,

as the acl object in injected in the layout , so you can access it in any view helper like this :  
$acl = $this-&gt;getView()-&gt;layout()-&gt;acl;

I suggest that do not use acl logic in the partial loop.  
If you share your problem , may be I can help with a better solution.</description></item><item><title>Micheal Wilkinson on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1471</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1471</guid><pubDate>Mon, 24 Jun 2013 13:33:30 GMT</pubDate><description>This works perfectly for me however I want to use a partial view script and I was wondering if you knew how to access the ACL information within the partial script</description></item><item><title>sandeep on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1432</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1432</guid><pubDate>Wed, 05 Jun 2013 14:32:31 GMT</pubDate><description>Hello,

It,s working fine.  
but the function form controller is accessable by ajax , this only prents the view rendering.</description></item><item><title>kalyani on Zend Framework 2 hello world project</title><link>https://ivangospodinow.com/zend-frameworl-2-hello-world-project.html#comment-1431</link><guid>https://ivangospodinow.com/zend-frameworl-2-hello-world-project.html#comment-1431</guid><pubDate>Wed, 05 Jun 2013 11:24:32 GMT</pubDate><description>good</description></item><item><title>anil on Adding Custom View Helper In Zend Framework 2</title><link>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-1430</link><guid>https://ivangospodinow.com/adding-custom-view-helper-in-zend-framework-2.html#comment-1430</guid><pubDate>Wed, 05 Jun 2013 08:10:20 GMT</pubDate><description>Hi

I am unable to call this view form phtml file</description></item><item><title>Dominic Watson on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1318</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1318</guid><pubDate>Wed, 29 May 2013 09:10:59 GMT</pubDate><description>Ctrl + F

“-&gt; ”  
Replace  
“-&gt;”

” -&gt;”  
Replace  
“-&gt;”

NO! Naughty! Bad Ivan! 😛

Nice and easy tutorial though 🙂 makes me feel silly for thinking anything is difficult. I guess it’s getting used to the EventManager</description></item><item><title>Anton Shumanski on Zend Framework 2 Navigation with ACL in 3 steps</title><link>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1035</link><guid>https://ivangospodinow.com/zend-framework-2-navigation-with-acl.html#comment-1035</guid><pubDate>Wed, 08 May 2013 10:47:30 GMT</pubDate><description>Great article, but how I can add params to the links in menu?</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1013</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1013</guid><pubDate>Mon, 06 May 2013 08:42:37 GMT</pubDate><description>Hello Andrey ,

thank you for your question.

I created an Edit 2 for your case.  
By replacing those 2 lines of code , the roles will not inherit resources from one another.</description></item><item><title>Andrey on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1012</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-1012</guid><pubDate>Mon, 06 May 2013 08:01:52 GMT</pubDate><description>Hello.  
Thank you for great tutorial, but what about roles with different permissions?  
Looks like in your code each role is allowed also for resource listed in all previous roles in array.</description></item><item><title>Ivan Gospodinow on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-735</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-735</guid><pubDate>Sat, 20 Apr 2013 18:56:18 GMT</pubDate><description>Hi Jim,

thank you very much for your questions.I updated the post so that everyone can see the answers.

If you have more questions or suggestions , do not hesitate to ask.</description></item><item><title>Jim on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-727</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-727</guid><pubDate>Fri, 19 Apr 2013 16:16:25 GMT</pubDate><description>Hi Ivan,

Do you have some more details about your cache programme. Where does it store the cache? How can I clean the cache and get it to rebuild? If I change page content, will the cache reset? If I am working as administrator, will other users use be sent pages from the cache? So far, the speed of my site is at least 3 times faster, but I need to know a bit more about how it works.

Thanks, Jim</description></item><item><title>Jose on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-627</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-627</guid><pubDate>Fri, 05 Apr 2013 14:35:02 GMT</pubDate><description>I think you should add a “comment text” with information, thanks</description></item><item><title>Ivan Gospodinow on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-625</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-625</guid><pubDate>Thu, 04 Apr 2013 20:31:11 GMT</pubDate><description>Hello Jose ,  
there are three ways of telling that this plugin is doing the job:  
1&#92;. If you have firebug(for mozilla) press f12 and go to network and check the waiting time of page index.If should be no more than 100ms.(20-30ms normally and up to 1000ms on normal wp site).  
2&#92;. Upload it and test in by yourself.Notise that this plugin is completely removable.  
3&#92;. Plugin statistics.  
Please note , that plugin will start working 1 minute after you stop using the admin panel and it will refresh the cache after you log in again.</description></item><item><title>Jose on The best caching plugin for wordpress.</title><link>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-623</link><guid>https://ivangospodinow.com/the-best-caching-plugin-for-wordpress.html#comment-623</guid><pubDate>Thu, 04 Apr 2013 15:33:21 GMT</pubDate><description>Hello, how can I verify that the plugin is really doing cache job? thanks</description></item><item><title>Ivan Gospodinow on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-583</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-583</guid><pubDate>Thu, 21 Mar 2013 10:51:08 GMT</pubDate><description>Hello and thank you user1 ,

yes you are right.The code from tutorial assumes that you have all the routes inserted in the acl (which is a good thing).That means you are controlling all the routes with roles.</description></item><item><title>user1 on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-582</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-582</guid><pubDate>Wed, 20 Mar 2013 20:01:44 GMT</pubDate><description>Oh, i just found solution 🙂

Replace line

if (!$e -&gt; getViewModel() -&gt; acl -&gt; isAllowed($userRole, $route)) {

to

if (!$e -&gt; getViewModel() -&gt; acl -&gt;hasResource($route) || !$e -&gt; getViewModel() -&gt; acl -&gt; isAllowed($userRole, $route)) {</description></item><item><title>user1 on Zend Framework 2 ACL setup in 5 minutes – tutorial</title><link>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-581</link><guid>https://ivangospodinow.com/zend-framework-2-acl-setup-in-5-minutes-tutorial.html#comment-581</guid><pubDate>Wed, 20 Mar 2013 19:51:49 GMT</pubDate><description>Hi, great tutorial!

Everything works fine, but when i go to route, that guest role does not have, i get an exception:

Fatal error: Uncaught exception ‘Zend&#92;&#92;Permissions&#92;&#92;Acl&#92;&#92;Exception&#92;&#92;InvalidArgumentException’ with message ‘Resource ‘success’ not found’ in

Acl&#92;&#92;Acl-&gt;isAllowed(‘guest’, ‘success’) #2 &#92;[internal function&#92;]: Application&#92;&#92;Module-&gt;checkAcl(Object(Zend&#92;&#92;Mvc&#92;&#92;MvcEvent))

Something is not good about this line:

if (!$e -&gt; getViewModel() -&gt; acl -&gt; isAllowed($userRole, $route)) {</description></item></channel></rss>
