<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Zend_Acl Quickstart</title>
	<atom:link href="http://www.roetgers.org/screencast-index/zend_acl-quickstart/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roetgers.org</link>
	<description>Weblog, Screencasts and Tutorials</description>
	<pubDate>Tue, 06 Jan 2009 12:24:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Mike</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-367</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 02 Jan 2009 05:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-367</guid>
		<description>This is a very excellent screencast!! Thanks so much for providing a useful example with clear explanations as to why you are doing each step and taking nothing for granted. I look forward to you future screencasts!

Thanks!
-Mike</description>
		<content:encoded><![CDATA[<p>This is a very excellent screencast!! Thanks so much for providing a useful example with clear explanations as to why you are doing each step and taking nothing for granted. I look forward to you future screencasts!</p>
<p>Thanks!<br />
-Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thimo</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-257</link>
		<dc:creator>Thimo</dc:creator>
		<pubDate>Mon, 24 Nov 2008 09:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-257</guid>
		<description>Hi,

I really rarely write a comment but i think you have earned it!
Thanks for this really great tutorial! 
It's really easy now^^ And your debate is really good, also for "not-english-speeking-persons" ;)

Thanks allot!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I really rarely write a comment but i think you have earned it!<br />
Thanks for this really great tutorial!<br />
It&#8217;s really easy now^^ And your debate is really good, also for &#8220;not-english-speeking-persons&#8221; <img src='http://www.roetgers.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Thanks allot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Rötgers</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-114</link>
		<dc:creator>Mike Rötgers</dc:creator>
		<pubDate>Tue, 21 Oct 2008 20:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-114</guid>
		<description>Yes, new screencasts will follow as soon as my company's newest project is up and running. Topics will probably be Zend_Translate with gettext and Continuous Integration with phpUnderControl.</description>
		<content:encoded><![CDATA[<p>Yes, new screencasts will follow as soon as my company&#8217;s newest project is up and running. Topics will probably be Zend_Translate with gettext and Continuous Integration with phpUnderControl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alican</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-113</link>
		<dc:creator>Alican</dc:creator>
		<pubDate>Tue, 21 Oct 2008 18:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-113</guid>
		<description>Are you planning another screencasts for other components, I think Zend_Lucene and Zend_Translate would be great. 
Also this is great tutorial, thank you for your efforts.</description>
		<content:encoded><![CDATA[<p>Are you planning another screencasts for other components, I think Zend_Lucene and Zend_Translate would be great.<br />
Also this is great tutorial, thank you for your efforts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pino</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-112</link>
		<dc:creator>Pino</dc:creator>
		<pubDate>Tue, 21 Oct 2008 09:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-112</guid>
		<description>Thank you very much for this quick response.</description>
		<content:encoded><![CDATA[<p>Thank you very much for this quick response.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Rötgers</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-111</link>
		<dc:creator>Mike Rötgers</dc:creator>
		<pubDate>Tue, 21 Oct 2008 06:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-111</guid>
		<description>I named my resources like my controllers. You can change that to a naming scheme like "modulename_controllername".
The plugin would then change to this:

[cc lang="php"]
class My_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
{
	public function preDispatch(Zend_Controller_Request_Abstract $request)
	{
		if (Zend_Auth::getInstance()-&gt;hasIdentity())
		{
			$role = Zend_Auth::getInstance()-&gt;getStorage()-&gt;read()-&gt;role;
		}
		else
		{
			$role = 'guest';
		}
		
		$acl = new My_Acl();
		
		if (!$acl-&gt;isAllowed(
			$role,
			$request-&gt;getModuleName() . '_' . $request-&gt;getControllerName(),
			$request-&gt;getActionName()
		))
		{
			throw new Zend_Exception('Access Denied!');
		}
	}
}
[/cc]

</description>
		<content:encoded><![CDATA[<p>I named my resources like my controllers. You can change that to a naming scheme like &#8220;modulename_controllername&#8221;.<br />
The plugin would then change to this:</p>
<div class="codecolorer-container php" style="height:280px;"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">class</span> My_Controller_Plugin_Acl <span class="kw2">extends</span> Zend_Controller_Plugin_Abstract<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw2">function</span> preDispatch<span class="br0">&#40;</span>Zend_Controller_Request_Abstract <span class="re0">$request</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>Zend_Auth::<span class="me2">getInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">hasIdentity</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$role</span> = Zend_Auth::<span class="me2">getInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">getStorage</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">read</span><span class="br0">&#40;</span><span class="br0">&#41;</span>-&gt;<span class="me1">role</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$role</span> = <span class="st0">'guest'</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$acl</span> = <span class="kw2">new</span> My_Acl<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$acl</span>-&gt;<span class="me1">isAllowed</span><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$role</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$request</span>-&gt;<span class="me1">getModuleName</span><span class="br0">&#40;</span><span class="br0">&#41;</span> . <span class="st0">'_'</span> . <span class="re0">$request</span>-&gt;<span class="me1">getControllerName</span><span class="br0">&#40;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$request</span>-&gt;<span class="me1">getActionName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw <span class="kw2">new</span> Zend_Exception<span class="br0">&#40;</span><span class="st0">'Access Denied!'</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pino</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-108</link>
		<dc:creator>Pino</dc:creator>
		<pubDate>Mon, 20 Oct 2008 14:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-108</guid>
		<description>Thank you very much. This is a really good tutorial...
But how would the My_Controller_Plugin_Acl's preDispatch()-method change if I have a site that does also have modules.
So for exampla I have the default-module with two actions:
1. IndexAction - everybody can access this
2. MemberAction - just Members can access this

And a CMS-module with some actions, but this is just for admins.

I guess that the parameters whithin call to $asl-&#62;isAllowed() would change. But to what? Do I have to check for modules and contollers?</description>
		<content:encoded><![CDATA[<p>Thank you very much. This is a really good tutorial&#8230;<br />
But how would the My_Controller_Plugin_Acl&#8217;s preDispatch()-method change if I have a site that does also have modules.<br />
So for exampla I have the default-module with two actions:<br />
1. IndexAction - everybody can access this<br />
2. MemberAction - just Members can access this</p>
<p>And a CMS-module with some actions, but this is just for admins.</p>
<p>I guess that the parameters whithin call to $asl-&gt;isAllowed() would change. But to what? Do I have to check for modules and contollers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Genio Salama</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-56</link>
		<dc:creator>Genio Salama</dc:creator>
		<pubDate>Sat, 20 Sep 2008 11:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-56</guid>
		<description>Thank you so  so so so much , I`m practitioner developer and I should understand how ZF works better , u gave me such a nice clue :)</description>
		<content:encoded><![CDATA[<p>Thank you so  so so so much , I`m practitioner developer and I should understand how ZF works better , u gave me such a nice clue <img src='http://www.roetgers.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Rötgers</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-33</link>
		<dc:creator>Mike Rötgers</dc:creator>
		<pubDate>Thu, 28 Aug 2008 19:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-33</guid>
		<description>Thank you for your feedback. More will follow soon.</description>
		<content:encoded><![CDATA[<p>Thank you for your feedback. More will follow soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.roetgers.org/screencast-index/zend_acl-quickstart/#comment-32</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Thu, 28 Aug 2008 19:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.roetgers.org/?page_id=36#comment-32</guid>
		<description>Thank you so much for this very understandable screencast. It should be added to the zend framework official documentation!
I'm on the watchout for more like these!</description>
		<content:encoded><![CDATA[<p>Thank you so much for this very understandable screencast. It should be added to the zend framework official documentation!<br />
I&#8217;m on the watchout for more like these!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
