<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tony Thomas &#187; ACL</title>
	<atom:link href="http://anthonygthomas.com/category/web-development/php/cakephp-php/acl/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonygthomas.com</link>
	<description>This is my blog.</description>
	<lastBuildDate>Sat, 20 Mar 2010 20:24:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CakePHP Console ACL Help File</title>
		<link>http://anthonygthomas.com/2009/03/22/cakephp-console-acl-help-file/</link>
		<comments>http://anthonygthomas.com/2009/03/22/cakephp-console-acl-help-file/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 15:30:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACL]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[cli]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=95</guid>
		<description><![CDATA[Every now and then I want to view my help files in pretty, formatted HTML instead of plain text in a text editor or terminal window. Right now I&#8217;m working on setting up some Access Control Lists (ACL) in the CakePHP Console. ACL is a powerful, yet sometimes hard-to-grasp concept. I always figure that if [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I want to view my help files in pretty, formatted HTML instead of plain text in a text editor or terminal window. Right now I&#8217;m working on setting up some Access Control Lists (ACL) in the <a href="http://book.cakephp.org/view/108/the-cakephp-console" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/108/the-cakephp-console?referer=');">CakePHP Console</a>. ACL is a powerful, yet sometimes hard-to-grasp concept. I always figure that if I want a resource like this, there has to be someone else out there who does, so for your reference and mine, here it is. (By the way, to get to this from the console, simply type <code>cake acl help</code>.)</p>
<p>Usage: <code>cake acl &lt;command&gt; &lt;arg1&gt; &lt;arg2&gt;...<!--formatted--></code><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Commands:</p>
<p><code>create aro|aco &lt;parent&gt; &lt;node&gt;<!--formatted--></code><br />
Creates a new ACL object &lt;node&gt; under the parent specified by &lt;parent&gt;, an id/alias.<br />
The &lt;parent&gt; and &lt;node&gt; references can be in one of the following formats:</p>
<ul>
<li> &#8211; &lt;model&gt;.&lt;id&gt; &#8211; The node will be bound to a specific record of the given model</li>
<li>- &lt;alias&gt; &#8211; The node will be given a string alias (or path, in the case of &lt;parent&gt;),</li>
</ul>
<p>i.e. &#8216;John&#8217;.  When used with &lt;parent&gt;, this takes the form of an alias path,<br />
i.e. &lt;group&gt;/&lt;subgroup&gt;/&lt;parent&gt;.<br />
To add a node at the root level, enter &#8216;root&#8217; or &#8216;/&#8217; as the &lt;parent&gt; parameter.</p>
<p><code>delete aro|aco &lt;node&gt;<!--formatted--></code><br />
Deletes the ACL object with the given &lt;node&gt; reference (see &#8216;create&#8217; for info on node references).</p>
<p><code>setParent aro|aco &lt;node&gt; &lt;parent&gt;<!--formatted--></code><br />
Moves the ACL object specified by &lt;node&gt; beneath the parent ACL object specified by &lt;parent&gt;.<br />
To identify the node and parent, use the row id.</p>
<p><code>getPath aro|aco &lt;node&gt;<!--formatted--></code><br />
Returns the path to the ACL object specified by &lt;node&gt;. This command is useful in determining the inhertiance of permissions for a certain object in the tree.<br />
For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>check &lt;aro_id&gt; &lt;aco_id&gt; [&lt;aco_action&gt;] or all<!--formatted--></code><br />
Use this command to check ACL permissions.<br />
For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>grant &lt;aro_id&gt; &lt;aco_id&gt; [&lt;aco_action&gt;] or all<!--formatted--></code><br />
Use this command to grant ACL permissions. Once executed, the ARO specified (and its children, if any) will have ALLOW access to the specified ACO action (and the ACO&#8217;s children, if any). For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>deny &lt;aro_id&gt; &lt;aco_id&gt; [&lt;aco_action&gt;]or all<!--formatted--></code><br />
Use this command to deny ACL permissions. Once executed, the ARO specified (and its children, if any) will have DENY access to the specified ACO action (and the ACO&#8217;s children, if any). For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>inherit &lt;aro_id&gt; &lt;aco_id&gt; [&lt;aco_action&gt;]or all<!--formatted--></code><br />
Use this command to force a child ARO object to inherit its permissions settings from its parent. For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>view aro|aco [&lt;node&gt;]<!--formatted--></code><br />
The view command will return the ARO or ACO tree. The optional id/alias parameter allows you to return only a portion of the requested tree. For more detailed parameter usage info, see help for the &#8216;create&#8217; command.</p>
<p><code>initdb</code><br />
Uses this command : <code>cake schema run create DbAcl</code></p>
<p><code>help [&lt;command&gt;]<!--formatted--></code><br />
Displays this help message, or a message on a specific command.</p>
<h3>The &#8216;create&#8217; help file</h3>
<p>Usage: cake acl &lt;command&gt; &lt;arg1&gt; &lt;arg2&gt;&#8230;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<ul>
<li>Commands:
<ul>
<li><code>create aro|aco &lt;parent&gt; &lt;node&gt;<code> </code><!--formatted--></code>
<ul>
<li>Creates a new ACL object <code>&lt;node&gt;<!--formatted--></code> under the parent specified by <code>&lt;parent&gt;<!--formatted--></code>, an id/alias. The <code>&lt;parent&gt; and &lt;node&gt;<!--formatted--></code> references can be in one of the following formats:
<ul>
<li>- <code>&lt;model&gt;.&lt;id&gt;<!--formatted--></code> &#8211; The node will be bound to a specific record of the given model</li>
<li>- <code>&lt;alias&gt;<!--formatted--></code> &#8211; The node will be given a string alias (or path, in the case of <code>&lt;parent&gt;<!--formatted--></code>), i.e. &#8216;John&#8217;.  When used with <code>&lt;parent&gt;<!--formatted--></code>, this takes the form of an alias path, i.e. <code>&lt;group&gt;/&lt;subgroup&gt;/&lt;parent&gt;<!--formatted--></code>. To add a node at the root level, enter &#8216;root&#8217; or &#8216;/&#8217; as the <code>&lt;parent&gt;<!--formatted--></code> parameter.</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2009/03/22/cakephp-console-acl-help-file/" rel="bookmark" title="March 22, 2009">CakePHP Console ACL Help File</a></li>
<li><a href="http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/" rel="bookmark" title="June 20, 2008">Wow. ACL is Hard</a></li>
<li><a href="http://anthonygthomas.com/2008/04/10/googles-appengine/" rel="bookmark" title="April 10, 2008">Google&#8217;s AppEngine</a></li>
<li><a href="http://anthonygthomas.com/2008/11/26/getting-blueprint-css-javascript-libraries-into-your-cakephp-layout/" rel="bookmark" title="November 26, 2008">Getting Blueprint CSS &#038; JavaScript Libraries Into Your CakePHP Layout</a></li>
<li><a href="http://anthonygthomas.com/2008/11/25/wordpress-auto-update-is-ok-but-the-command-line-is-faster/" rel="bookmark" title="November 25, 2008">Wordpress&#8217; Auto Update Is OK, But The Command Line Is Faster</a></li>
</ul>
<p><!-- Similar Posts took 5.305 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2009/03/22/cakephp-console-acl-help-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And We&#8217;re Back!</title>
		<link>http://anthonygthomas.com/2008/09/22/and-were-back/</link>
		<comments>http://anthonygthomas.com/2008/09/22/and-were-back/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 20:55:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACL]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=36</guid>
		<description><![CDATA[I have been so incredibly busy the last few months that aside for 140 character Twitter updates, I haven&#8217;t been able to keep this blog updated with my exploits.
If you are still paying attention, I was complaining about ACL. After several attempts, I gave up using the built-in ACL component in CakePHP and just decided [...]]]></description>
			<content:encoded><![CDATA[<p>I have been so incredibly busy the last few months that aside for 140 character Twitter updates, I haven&#8217;t been able to keep this blog updated with my exploits.</p>
<p>If you are still paying attention, <a href="http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/">I was complaining about ACL</a>. After several attempts, I gave up using the <a href="http://book.cakephp.org/view/171/Access-Control-Lists" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/171/Access-Control-Lists?referer=');">built-in ACL component in CakePHP</a> and just decided to keep things simple, <a href="http://book.cakephp.org/view/172/Authentication" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/172/Authentication?referer=');">use the Auth component</a> with role-based access control. Problem solved.</p>
<p>The development of the application has progressed smoothly since getting over that hurdle.</p>
<p>In the meantime, I&#8217;ve been setting up my own virtual server for hosting websites for my freelance clients. That has been a learning experience in itself. I&#8217;ll post more about that as I formally launch that service.</p>
<p>I&#8217;m also way behind on podcasts for the Minneapoliscast podcast. I hope to resume that at a modest pace this fall.</p>
<p>More later as all of my respective projects get updates including SVN info on my CakePHP app.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2008/09/22/and-were-back/" rel="bookmark" title="September 22, 2008">And We&#8217;re Back!</a></li>
<li><a href="http://anthonygthomas.com/2009/07/22/simple-security-in-cakephp/" rel="bookmark" title="July 22, 2009">Simple Security in CakePHP</a></li>
<li><a href="http://anthonygthomas.com/2009/04/06/minnewebcon-2009/" rel="bookmark" title="April 6, 2009">MinneWebCon 2009</a></li>
<li><a href="http://anthonygthomas.com/2009/05/22/roll-your-own-cakephp-components/" rel="bookmark" title="May 22, 2009">Roll Your Own CakePHP Components</a></li>
<li><a href="http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/" rel="bookmark" title="June 20, 2008">Wow. ACL is Hard</a></li>
</ul>
<p><!-- Similar Posts took 5.345 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2008/09/22/and-were-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wow. ACL is Hard</title>
		<link>http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/</link>
		<comments>http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 18:55:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ACL]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[access control lists]]></category>
		<category><![CDATA[modified preorder tree traversal algorithm]]></category>

		<guid isPermaLink="false">http://anthonygthomas.com/?p=34</guid>
		<description><![CDATA[That is Access Control Lists. I&#8217;ve been developing with CakePHP this spring and summer and it was all going very well until I actually needed to control access to the application. It&#8217;s not even that CakePHP falls short here. There are apparently tons of built-in tools for managing access. They&#8217;re just poorly documented and the [...]]]></description>
			<content:encoded><![CDATA[<p>That is Access Control Lists. I&#8217;ve been developing with <a href="http://cakephp.org" onclick="pageTracker._trackPageview('/outgoing/cakephp.org?referer=');">CakePHP</a> this spring and summer and it was all going very well until I actually needed to control access to the application. It&#8217;s not even that CakePHP falls short here. There are apparently tons of built-in tools for managing access. They&#8217;re just poorly documented and the community is relatively new so no one has built a complete plug in. If you&#8217;re looking for a solution like I was, I&#8217;m afraid I&#8217;m not going to give you the best answer here. I did find something that works, so read on. Especially if you&#8217;re learning ACL or Modified Preorder Tree Traversal Algorithm (MPTTA) for the first time.</p>
<p>Disclosure: I&#8217;m not formally trained as a programmer/developer. Everything I&#8217;ve learned, I&#8217;ve taught myself. So there are definitely some silos in my knowledge as I&#8217;ve learned things on the basis of necessity. I have, however, been developing in PHP for over six years. So it&#8217;s not all that bad.</p>
<p>So the learning curve for implementing ACL has been relatively steep for me. First, I had to get my head around the concept. The big picture is easy. <a title="ACL in the CakePHP Manual" href="http://book.cakephp.org/view/171/access-control-lists" onclick="pageTracker._trackPageview('/outgoing/book.cakephp.org/view/171/access-control-lists?referer=');">What we&#8217;re after is a tree of access with &#8216;admin&#8217; at the root and everything else branching off from that with diminishing access</a>. That&#8217;s not hard to conceptualize. What is hard is putting that into practice.</p>
<p>I messed around with this for a long time before stumbling upon <a href="http://www.sitepoint.com/article/hierarchical-data-database/2" onclick="pageTracker._trackPageview('/outgoing/www.sitepoint.com/article/hierarchical-data-database/2?referer=');">this tutorial about the Modified Preorder Tree Traversal Algorithm</a>. Stop now. Read it. Come back.</p>
<p>Now you should understand the concepts that drive CakePHP&#8217;s ACL. Unfortunately here is also where we depart from using CakePHP&#8217;s tools. At least until a decent plug-in comes along that allows you to manage Access Request Objects (ARO) and Access Control Objects (ACO) via a good, web-based interface.</p>
<p>After many attempts with <a href="http://bakery.cakephp.org/tags/view/acl" onclick="pageTracker._trackPageview('/outgoing/bakery.cakephp.org/tags/view/acl?referer=');">various solutions that are currently avaliable</a>, I finally settled on <a href="http://conseil-recherche-innovation.net/authake" onclick="pageTracker._trackPageview('/outgoing/conseil-recherche-innovation.net/authake?referer=');">Authake</a>.</p>
<p>Pros:</p>
<ul>
<li>Works in CakePHP 1.2</li>
<li>User, ARO &amp; ACO adminstration is a snap</li>
<li>Access control works immediately without modifying anything you&#8217;ve built in your app.</li>
</ul>
<p>Cons:</p>
<ul>
<li>Installation requires you replace the entire CakePHP engine with Authake&#8217;s modified version. This will make upgrading CakePHP a lot harder.</li>
<li>The developer has abandoned it in favor of developing in RoR. No hope for future versions unless the community continues development. Personally, I&#8217;d prefer a plug-in like<a href="http://bakery.cakephp.org/articles/view/acl-management-plugin" onclick="pageTracker._trackPageview('/outgoing/bakery.cakephp.org/articles/view/acl-management-plugin?referer=');"> Jeff <span class="author">Loiselle</span>&#8217;s ACL Management Plugin</a> that I could just drop right into app/plugins without replacing the entire installation. (<a href="http://dev.newnewmedia.com/cakephp/admin/acl" onclick="pageTracker._trackPageview('/outgoing/dev.newnewmedia.com/cakephp/admin/acl?referer=');">The issue I have with Jeff&#8217;s are all listed on his &#8220;Known Bugs&#8221; list</a>. Namely, &#8220;does not show inherited permissions, does not show full path in finder &amp; does not have crud fields&#8221;. Unfortunately, those are three very major elements of managing ACL.)</li>
</ul>
<p>If you are reading this in the not so distant future and someone had developed a plugin that has an admin area like Authake&#8217;s but drops into app/plugins like Jeff&#8217;s plugin, please, <em>please</em> let me know.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/" rel="bookmark" title="June 20, 2008">Wow. ACL is Hard</a></li>
<li><a href="http://anthonygthomas.com/2009/03/22/cakephp-console-acl-help-file/" rel="bookmark" title="March 22, 2009">CakePHP Console ACL Help File</a></li>
<li><a href="http://anthonygthomas.com/2010/02/18/cakephp-containable-behavior-is-your-friend/" rel="bookmark" title="February 18, 2010">CakePHP: Containable Behavior is Your Friend</a></li>
<li><a href="http://anthonygthomas.com/2008/09/22/and-were-back/" rel="bookmark" title="September 22, 2008">And We&#8217;re Back!</a></li>
<li><a href="http://anthonygthomas.com/2008/11/25/wordpress-auto-update-is-ok-but-the-command-line-is-faster/" rel="bookmark" title="November 25, 2008">Wordpress&#8217; Auto Update Is OK, But The Command Line Is Faster</a></li>
</ul>
<p><!-- Similar Posts took 4.541 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonygthomas.com/2008/06/20/wow-acl-is-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
