RABC vs. ACL Smackdown

2009-03-28 Thread aranworld
Some guy left a comment on a blog that said that I shouldn't be using CakePHP, because its use of ACL is very antiquated. The guy was obviously trying to promote his own PHP framework that uses RABC instead. After reading about RABC, though, I'm having a bit of a hard time understanding the

Re: Book Comments - Should they be removed

2009-03-13 Thread aranworld
I like where Martin is going. I think it would be fantastic if we could see all proposed/submitted edits for a particular section. That would be much more useful than the comments, and I think it would also encourage people to provide edits if they were able to see what kinds of submissions had

Anyone subscribe to PHP Architect?

2009-01-21 Thread aranworld
PHP Architect seems somewhat centered on the Zend Framework, so I'm wondering if it is a worthwhile magazine for someone whose main focus is CakePHP. So, if you subscribe to it, do you find it worth the money and time spent reading it? --~--~-~--~~~---~--~~ You

Re: validate 'minLength' for 'password' field

2009-01-21 Thread aranworld
Yes, you can do this. In my User model, I have a series of validation rules for a field called new_passwd. After this field is validated for things like minimum length I then have it hashed into the string that gets stored in the database. Here is a bakery article that can show how to do some

Re: Separate message for Auth and ACL

2009-01-14 Thread aranworld
Off the top of my head, I would think you could add some logic to your app_controller beforeFilter() in which you check for the existence of the Auth session information. If it doesn't exist, then trigger your redirection to the login page. Otherwise, just let the automatic error get displayed.

Re: the Gift of 1.2 Final

2009-01-02 Thread aranworld
Thanks for the gift! If we have been updating our Cake install from: https://svn.cakephp.org/repo/branches/1.2.x.x Is it still recommended to update from there? I assume that any bugfixes are going to continue to be reflected in the svn? Or, is that it for 1.2.x.x? Will there be no more

Re: Has cakephp detailed examples?

2009-01-02 Thread aranworld
Try this out: http://book.cakephp.org/view/219/Blog Note also that this documentation has been translated into a bunch of different languages, in case English is not your first choice. On Jan 2, 10:44 pm, Rimoe meiyo...@gmail.com wrote: hi,everyone. Do you know the cakephp has some detailed

Re: Is CakePHP 1.2 fully backwards compatible with 1.1.16?

2008-12-12 Thread aranworld
The following are the main things I came across during a recent upgrade: -- all the html helper functions related to forms have been eliminated and replaced by the form helper -- getElement() has been replaced by element() -- the syntax for making queries has been significantly altered

Re: Can/Should I use 1.2RC3 in a production environment

2008-12-07 Thread aranworld
For the last 6 months or so, most of the changes made to the 1.2 core code have been with regards to test coverage. Very little (if any) of the most commonly used API has changed, and I think the developers have been pretty clear that not much will change either. For the most part, websites I

Re: ACL Question based on ACL example in cookbook (1.2)

2008-12-05 Thread aranworld
The first step you should do is to write out an example of what you want your ARO tree to look like. I think it will then be easier for someone to help you out. For example, I often have a tree that looks like the following: Superusers Users --Staff John Kramer Alex Wylde Managers

RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
I am finding the manual entry on generating RSS Feeds really helpful except for one minor detail. http://book.cakephp.org/view/483/Creating-an-RSS-feed-with-the-RssHelper When someone requests posts/index.rss , what controller method is actually called? Is Posts::index() called? Where should

Re: RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
/index uses paginate? How could I make a controller action called index, that handled both an rss request and a regular request, using different logic for each one? -Aran On Nov 25, 2:07 pm, aranworld [EMAIL PROTECTED] wrote: I am finding the manual entry on generating RSS Feeds really helpful

Re: RSS Feed ... what method is called by index.rss

2008-11-25 Thread aranworld
is supposed to be completely different from the   regular page, just name it something else like feed.rss and have a   dedicated feed() action in your controller for it. On 26 Nov 2008, at 14:28, aranworld wrote: Well, I realize it is a pretty dumb question.  Obviously, the index() method

best way to share identical templates?

2008-11-20 Thread aranworld
For the most part, all my edit and add methods can use the same form template. Right now, I create a single form template and in my add.ctp and edit.ctp templates, I just include this template. However, this also means that almost all of teh add.ctp and edit.ctp templates in my project are

Re: General ACL Question

2008-11-20 Thread aranworld
Sorry for writing something that looked like griping! I was absolutely NOT complaining about how the Auth Component works -- even though a year ago, I did once make this complaint. On the other hand, it is nice to have such a nicely worded explanation of why this feature is not in the core

Re: strange request: store view templates in one location

2008-11-20 Thread aranworld
I get the feeling this is the type of client who might call you up in 6 months complaining about how many templates there are and request that you organize them into sub-directories. It is probably worth your time to try and convince this guy to defer to your expertise and trust you that the

Re: best way to share identical templates?

2008-11-20 Thread aranworld
for? On Nov 20, 1:42 pm, aranworld [EMAIL PROTECTED] wrote: For the most part, all my edit and add methods can use the same form template. Right now, I create a single form template and in my add.ctp and edit.ctp templates, I just include this template. However, this also means

Re: best way to share identical templates?

2008-11-20 Thread aranworld
Thank you! That is exactly the type of idea I was looking for. -Aran On Nov 20, 1:36 pm, AD7six [EMAIL PROTECTED] wrote: On Nov 20, 10:14 pm, aranworld [EMAIL PROTECTED] wrote: I don't want to create an add or edit template for any of my controllers.  Since my add and edit templates

Re: General ACL Question

2008-11-19 Thread aranworld
The problem lies with the Auth Component. When parsing a URL to determine if a user has access to a resource, the Auth Component does not factor in the id (or any other passed parameter). This means that you cannot use the Auth Component to automatically protect content on a record level basis

Is Dreamweaver useless for a CakePHP project?

2008-11-19 Thread aranworld
Don't worry, this is not another post asking how to open .ctp files in Dreamweaver... My question is directed at anyone who might have worked on a CakePHP project in Dreamweaver ... or, is this even possible? So many of my template files are filled with calls to the html helper, that I have to

lots of element templates ... is this a good thing?

2008-10-17 Thread aranworld
As I work on my CakePHP based projects, I find that my views/elements directory gets more and more filled. I really like putting view logic in elements even in cases where I am not actually re-using the element. I find I am treating elements almost like functions, so that when I have a fairly

How to cache page with same controller/action, but different parameters.

2008-09-23 Thread aranworld
Is there a way to cache the following two pages so that the cached pages are different? http://www.cakephp.org/articles/index/18?year=2003 http://www.cakephp.org/articles/index/18?year=2007 The default behavior of the Cache helper seems to just make these two pages have the same content which

Re: Acl and Auth at record level with crud mode

2008-09-08 Thread aranworld
give you some direction in how to put together your own modified AuthComponent that does pass along the id. -Aran On Sep 8, 9:23 am, luke BAKING barker [EMAIL PROTECTED] wrote: aranworld - I am wondering how this could be made universal throughout an app...better possibly in the app_model somehow

Re: ACL and non CRUD actions

2008-09-01 Thread aranworld
There is a variable in the AuthComponent called actionMap that assigns actions one of the four CRUD actions. To add an action named 'organize' to the list of controlled actions, you do the following from within your controller: $this-Auth-actionMap['organize'] = 'update'; See more here:

Re: Acl and Auth at record level with crud mode

2008-08-28 Thread aranworld
You can add this to your UsersController: function __checkUsersOwnRecord($recordId = null) { if( $this-Auth-user('id') == $recordId ){ return TRUE; } else { return FALSE; } } Give all users access to users/edit ... however, before you do any edit functionality first

Re: Auth Component - I'm going crazy

2008-08-26 Thread aranworld
I have had situations in which I was unable to use a column named password and had to instead use something like passwd. I believe it is a reserved keyword issue with MySQL? Not sure if it was just related to an older version, but you might at least try changing the column name. -Aran On Aug

Re: Is there any good way to make url difficult to guess

2008-08-26 Thread aranworld
If you are interested to see this type of strategy used for image urls, check out flickr and look at the image urls. On Aug 25, 9:16 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On Tue, Aug 26, 2008 at 8:54 AM, Jerry [EMAIL PROTECTED] wrote: Hi: is there any way to make application url

Re: Is there any good way to make url difficult to guess

2008-08-26 Thread aranworld
I agree wtih benjam that URL obscurity is not a good way to protect content that could otherwise be protected through something like ACL. The reason why the Flickr example is interesting is because they are actually using URL obscurity to protect images, which like any binary downloadable file

Re: How to test the database connection?

2008-08-26 Thread aranworld
I wonder if we have the same web host ... Hostway perhaps? I am just in the middle of figuring this out as well and I came across the following code that I believe still works, however, I must warn you that I have not tested this out fully, but maybe this will at least put you in the right

Re: MD5 Passwords Help

2008-08-25 Thread aranworld
I'm not sure how the rest of your app is configured, but my guess is that the last line is causing you problems: $this-Auth-login($this-User); I'm not sure it is necessary to do this, because now that you have modified the database entry for the user, I believe the standard AuthComponent login

Preventing Cache Reload In Case of Database Failure?

2008-08-23 Thread aranworld
This is what is currently happening to a site I have: 1) person visits site's home page, which contains an element which displays the top news stories from the database 2) since the element is set to be cached, a cached view file is set with an expiration of 3 hours ... 2 hours later ... 3) the

Re: User Authentication Methods

2008-08-23 Thread aranworld
Here is a step-by-step summary that should hopefully help you grasp how Auth and ACL are working together. http://aranworld.com/article/164/cakephp-acl-tutorial-auth-component-example ACL is basically a database of permissions. The Auth Component is programmed to query that database to dermine

Re: ACL with multi-group membership?

2008-07-17 Thread aranworld
I really don't think you should be holding your breath for the Cake component to support multiple groups per user. So, Mark's solution of writing his own version is probably the only short-term solution. But I agree with Stinkbug that there are often times when it seems like multiple groups are

Re: API 1.2 chm or pdf

2008-07-15 Thread aranworld
I'm sure the developers will release it as soon as Day 2.0 is released. You know, the one with 26 hours instead of 24. I agree that this would be a good thing to have, but instead of just demanding it, why don't you offer to put in some of the work needed to create it? On Jul 14, 11:29 pm,

Re: Test Suite: parsing a CSV file, where to store file?

2008-07-15 Thread aranworld
a more standard place to put the CSV file is on temporary directory (/tmp) or on a webroot/files directory. []'s On Mon, Jul 14, 2008 at 10:35 PM, Grant Cox [EMAIL PROTECTED] wrote: I do the same, and keep the file in fixtures.  Makes sense to me :) On Jul 15, 8:33 am, aranworld [EMAIL

Re: ACL

2008-07-14 Thread aranworld
I prefer using the honor system to ACL myself. It is much easier to set up. -Aran On Jul 14, 12:39 pm, John David Anderson [EMAIL PROTECTED] wrote: http://book.cakephp.org/view/171/access-control-lists -- John On Jul 14, 2008, at 1:17 PM, puneetratan wrote: Hello Group, Can anyone

Re: ACL

2008-07-14 Thread aranworld
The documentation is definitely getting better all the time. You guys are doing a great job. -Aran On Jul 14, 2:07 pm, John David Anderson [EMAIL PROTECTED] wrote: On Jul 14, 2008, at 1:38 PM, Chris Hartjes wrote: On Mon, Jul 14, 2008 at 3:17 PM, puneetratan [EMAIL PROTECTED]   wrote:

Test Suite: parsing a CSV file, where to store file?

2008-07-14 Thread aranworld
I need to create a test case for the parsing of a tab delimited file. Would it make sense to put the test version of this CSV file in the fixtures directory of my test suite? Or is there a more standard place to put a file like this? --~--~-~--~~~---~--~~ You

Sending DATE_SUB as argument in a Between query?

2008-07-12 Thread aranworld
This is the condition I want to display: AND `Grant`.`date` BETWEEN DATE_SUB('2006-01-01',INTERVAL `Grant`.`term` MONTH) AND '2005-12-31' This comes really close: $cond['and'] = array( Grant.date BETWEEN ? AND ? = array( DATE_SUB('2007-01-01',INTERVAL `Grant`.`term` MONTH)',

Re: the questions rarely answered. why?

2008-07-11 Thread aranworld
I agree with Wayne. More often than not a question is answered on this group. I would go so far as to say that the high quality of the community in this group is a selling point for CakePHP. Most often, I would say that a question doesn't get answered, because either: 1) it is about quite an

Re: SVN, Vendor Branching and cake upgrades

2008-07-06 Thread aranworld
, since I don't change the cake core either? On Jul 4, 6:22 pm, aranworld [EMAIL PROTECTED] wrote: I will second what AD7six says.  For a while I tried out this type of merging.  I soon realized that it is much easier to just leave the Cake core alone.  I just have a shared cake folder

Ajax Helper bug ... ajax form only works if an ajax link is also on page

2008-07-04 Thread aranworld
I am experiencing some very odd behavior with the Ajax helper. I have a page with the following structure index.ctp - ?php echo $ajax-form('view','post', array('update' = 'view_box') ); echo $form-submit('Display View'); echo $form-end(); ? div id=view_box This is where the

Re: Ajax Helper bug ... ajax form only works if an ajax link is also on page

2008-07-04 Thread aranworld
Nevermind, I finally figured it out. The Ajax Helper uses rand() to generate the ids of it's forms. There is a bug with rand() that causes it to generate the same number. mt_rand() doesn't suffer from this bug, so should be used instead. -Aran On Jul 4, 5:04 pm, aranworld [EMAIL PROTECTED

cake, app and webroot permission settings?

2008-07-02 Thread aranworld
This is always something I have guessed at. I just set directories at 755 and 777 if they need to be written to, but I would like to know what the absolute correct file permission settings would be for a cake project? If the server runs as user wwwrun belonging to group www and all my site's

Re: Cake 1.2 RC1 and MySQL 4.0 are not able to delete a record

2008-06-24 Thread aranworld
I would submit a bug on this. I ran across another MySQL 4.1 incompatibility last week and they fixed it. But first update to the latest SVN version, because maybe this has already been fixed. I came across another MySQL 4.1 issue that luckily wasn't causing me any problems, so I didn't dig

Re: content-based ACL

2008-06-23 Thread aranworld
I appreciate the feedback about the Cake console. I understand about shared hosts, however, even with many shared hosts, some sort of shell access is often granted. I have a site with Hostway (who sucks), but even they provide SSH access. If your shared host doesn't, I would ask them about it,

Web Interface for Cake Console?

2008-06-23 Thread aranworld
Has anyone ever investigated or created a web interface to the Cake Console? I'm not exactly sure how one would go about it, but since the Console us just using Cake and PHP, it would seem that a web interface is at least theoretically possible. What are the hurdles? I think this would be a

Re: Problem creating new ARO records

2008-06-23 Thread aranworld
I experienced that same problem with the array_intersect_key() a few days ago. I then updated by Cake, and the problem didn't crop up again. And he has that syntax correct. For an ARO you can most definitely use the user's username as the alias. On Jun 23, 12:26 pm, BrendonKoz [EMAIL

Re: Auth Component the most failment of Cakephp

2008-06-23 Thread aranworld
I'm curious to know why you are routing everything to the Contents_Controller rather than just put the functionality of the Contents_Controller into the app_controller? I think that one of the frustrations people have with the Auth component is that when a problem crops up, it can take a lot of

Re: content-based ACL

2008-06-22 Thread aranworld
Being someone who has spent a good amount of time writing some how-tos on the subject of ACL, I would be interested to know what part of it you are having difficulties with? I would be happy to write a tutorial to fill in whatever missing gap there is in the existing knowledge base.

Re: email headers visible in content of message?

2008-06-19 Thread aranworld
Well, good to know I'm not alone! When I send email from my local computer via SMTP, I don't get this problem, but when I send it from my remote host using whatever mailer they have, that is when I get the problems cropping up. -Aran On Jun 19, 5:59 am, ianh [EMAIL PROTECTED] wrote: Now you

Re: email headers visible in content of message?

2008-06-19 Thread aranworld
: Are both computers using the same OS? I wonder if the problem is with newlines Windows. On Thu, Jun 19, 2008 at 10:09 AM, aranworld [EMAIL PROTECTED] wrote: Well, good to know I'm not alone!   When I send email from my local computer via SMTP, I don't get this problem, but when I send

Re: Is the Tree Behavior broken?

2008-06-18 Thread aranworld
, aranworld [EMAIL PROTECTED] wrote: I started to discover some rather serious errors with the way lft and rght values were being set while creating ACL nodes. Now, I am looking at the Tree Behavior test case, and am getting 54 passes and 52 fails! Can anyone else replicate this failure rate

email headers visible in content of message?

2008-06-18 Thread aranworld
When sending email with the Email Component, some of my emails include the following types of headers in the body of the message: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-Id: [EMAIL PROTECTED] Date: Wed, 18 Jun 2008 11:01:31 -0500 (CDT) Anyone

MySQL 4.1 problems? Tree Behavior test fails in MySQL 4.1, not 5.0

2008-06-18 Thread aranworld
When I run the Tree Behavior test case under MySQL 4.1.14, I wind up with 54 passes, 52 fails and 1 exception. When I run the same test case under MySQL 5.0.18 all tests pass. In both cases, I am at the latest SVN update of 7210. Can anyone else replicate this? Has there been a change as far

Re: ACL inherit access not working

2008-06-17 Thread aranworld
:20 pm, aranworld [EMAIL PROTECTED] wrote: I don't see where you created the ACO node with the alias 'access'. You must create an aco node for every possible node that will be requested. A check on a non-existant node will return FALSE, and give you a result of not allowed. On Jun 16

Is the Tree Behavior broken?

2008-06-17 Thread aranworld
I started to discover some rather serious errors with the way lft and rght values were being set while creating ACL nodes. Now, I am looking at the Tree Behavior test case, and am getting 54 passes and 52 fails! Can anyone else replicate this failure rate for the Tree Behavior test case? I am

Re: ACL inherit access not working

2008-06-16 Thread aranworld
I don't see where you created the ACO node with the alias 'access'. You must create an aco node for every possible node that will be requested. A check on a non-existant node will return FALSE, and give you a result of not allowed. On Jun 16, 9:06 am, elGEoRgE [EMAIL PROTECTED] wrote: RC1

Re: Auth errors in RC1

2008-06-12 Thread aranworld
Could it have something to do with case sensitivity? I also am using Auth with 'crud' and am not having any troubles with the current svn version of cake on either my local windows or remote linux servers. There must be some difference between the two servers. Maybe the database schemas are

Re: Auth errors in RC1

2008-06-12 Thread aranworld
and it still works locally. Just curious, but why doesn't the acl join table follow cake conventions? Shouldn't it be acos_aros instead of aros_acos? -Corie On Jun 12, 12:16 pm, aranworld [EMAIL PROTECTED] wrote: Could it have something to do with case sensitivity? I also am using Auth with 'crud

Could HtmlHelper link generate an https url without including full URL?

2008-06-11 Thread aranworld
What I would love to be able to do is something like this: $html-link('login', '/users/login', array('secure'=TRUE) ); Depending on which server I was on, this would generate either: https://www.cakephp.org/users/login OR https://cakephp.localhost/users/login Currently, the problem is that

Re: Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-10 Thread aranworld
to the server over a   connection which is encrypted with SSL. If it is set to false, the   cookie will be sent whenever the user visits the domain. On 10 Jun 2008, at 14:44, aranworld wrote: So, the secure flag gets set in the cookie itself and ensures that the cookie is only ever read

Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread aranworld
In the cookie component there is: $secure = false If set to true, it will only allow you to write a cookie if the connect is through an HTTPS connection. But this flag has no impact on reading cookies. The component provides not method for ensuring that a cookie is only read under an SSL

Re: Shouldn't we use SSL when reading cookies as well as writing them?

2008-06-09 Thread aranworld
to continue to keep it secure after it is set. -Aran On Jun 9, 10:07 pm, David C. Zentgraf [EMAIL PROTECTED] wrote: Because the browser won't hand the cookie back to Cake over a non-SSL   connection anyway if it's been set as secure cookie(?). On 10 Jun 2008, at 13:57, aranworld wrote

Re: ACL schema

2008-06-08 Thread aranworld
param... Cheers, mbavio On Jun 7, 9:11 am, aranworld [EMAIL PROTECTED] wrote: For some reason, I thought the AuthComponent used the username in it's call to check but I can now see that in it's first parameter it is using the array representing data from the User model.   For some

Re: ACL schema

2008-06-07 Thread aranworld
', 'crudmappedaction'); and complement it with Acl Behavior, that not set Alias by default. Just my two cents. Cheers, mbavio On May 27, 11:29 am, aranworld [EMAIL PROTECTED] wrote: The Auth component has very specific rules for how it checks access. In 'actions' mode, it will do: check

Re: Strict or Pretty? We're looking for a few good opinions

2008-06-07 Thread aranworld
Sometimes us programmers not on the CakePHP development team will think that we have an improvement to the core code, so we come up with our own solution (hack) to improve things. But then inevitably the core code gets changed, and we suddenly find out that our hack is broken, or just didn't

Re: What is the best Image Upload / Thumbnail package for CakePHP?

2008-06-06 Thread aranworld
I agree with stefanski that it makes sense to put a lot of this into the model/behavior zone. I like to think of an imagefile as a piece of data, that I just happen to store in the filesystem rather than the database. But as far as uploaders go, there are some limitations with PHP that will

Re: Admin section without using admin routing

2008-06-05 Thread aranworld
The only thing stopping you is that you might come into problems having controllers with the same name. If you made a controller named useradmin_controller.php in / controllers/admin, cakephp will find it. However, if you have users_controller.php in BOTH /controllers and / controllers/admin, I

results of rand() seem to be cached by Cake with Firefox?

2008-06-04 Thread aranworld
I am experiencing a very bizarre problem. In core.php I have: Configure::write('Cache.disable', true); I have the following two files: pages/random_number.ctp ?php echo rand(0,100); ? www/random_number.php ?php echo rand(0,100); ? In Firefox: When I access

Re: results of rand() seem to be cached by Cake with Firefox?

2008-06-04 Thread aranworld
I have investigated further and it seems related to cookies. The cached values happen when I am logged in and have a cookie enabled. On Jun 4, 11:28 am, aranworld [EMAIL PROTECTED] wrote: I am experiencing a very bizarre problem. In core.php I have:     Configure::write('Cache.disable

Re: results of rand() seem to be cached by Cake with Firefox?

2008-06-04 Thread aranworld
I visit /pages/ random_number, I still see '80' after every single page reload? Anyone know what might be happening here? How is the result of rand() getting cached between different browsers? On Jun 4, 11:33 am, aranworld [EMAIL PROTECTED] wrote: I have investigated further and it seems related

Re: results of rand() seem to be cached by Cake with Firefox?

2008-06-04 Thread aranworld
Solved problem by using mt_rand() instead. Still, I would be interested to know why rand() kept generating the same number, while I had a cookie in use. -Aran On Jun 4, 11:42 am, aranworld [EMAIL PROTECTED] wrote: Ignore the part about Firefox and Internet Explorer. Here is a full

Re: Image manipulation functions ... in controller, model or component?

2008-06-02 Thread aranworld
Thanks for the different perspectives. I'm leaning towards having the functions in the image model. These functions will only ever be used when modifying an image whose pointer information is stored in database, so having the functions in the model doesn't decrease re-usability for me. Having

Re: Auth isAuthorized in crud mode - only checks Acl for current action?

2008-05-29 Thread aranworld
This is a case where you should be using: $this-Acl-check('aro_alias', 'CamelCaseController', 'crud action'); So, in your case, to find out if the logged in user 'henry' should be able to access /votes/restart, and you have mapped restart to 'update', then you do this: if(

Image manipulation functions ... in controller, model or component?

2008-05-29 Thread aranworld
Time for a semantic question. I have a controller for images, which handles the process of uploading an image to my website. Information about the image -- caption, filename, etc. -- is stored in the database with a model named Image. I have some functions which generate various sized versions

Re: Auth isAuthorized in crud mode - only checks Acl for current action?

2008-05-29 Thread aranworld
    restart     blahaction btw, your tutorial is very helpful as well! On May 29, 2:42 pm, aranworld [EMAIL PROTECTED] wrote: This is a case where you should be using: $this-Acl-check('aro_alias', 'CamelCaseController', 'crud action'); So, in your case, to find out if the logged

Re: Restricting Login Attempts with Auth Component

2008-05-28 Thread aranworld
.  You can find more about browser fingerprinting with a simple web search (and find better methods). On May 22, 4:29 pm, aranworld [EMAIL PROTECTED] wrote: Thanks for the feedback.  I will add some database functionality to it as well. One problem I am coming across is that many

Re: Recommended User Authentication setup?

2008-05-28 Thread aranworld
Chris' tutorials are definitely still relevant. In case you haven't seen it yet, I have created a sample website with downloadable source code, which demonstrates the integration of Auth and ACL in a CakePHP project: http://aranworld.com/article/170/cakephp-acl-and-auth-sample-website This

Restricting Login Attempts with Auth Component

2008-05-22 Thread aranworld
I am trying to figure out the most reliable way of restricting login attempts while using the Auth Component. Here is my best stab at the problem thus far: http://cakeforge.org/snippet/detail.php?type=snippetid=220 I'd love to hear what other people have done, or what they think of the method

Re: Restricting Login Attempts with Auth Component

2008-05-22 Thread aranworld
It may need some changes to make it work with 1.2 but I think it's simple and does it's job. On May 22, 9:13 pm, aranworld [EMAIL PROTECTED] wrote: I am trying to figure out the most reliable way of restricting login attempts while using the Auth Component. Here is my best stab

Re: General purpose page / design issues

2008-05-21 Thread aranworld
This is the article you want to read: http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction For a home page, you maybe won't even have a controller. Instead you create a template in your pages directory. This page will include a number of calls to

Re: New User

2008-05-21 Thread aranworld
There is a very similar discussion thread posted yesterday here: http://groups.google.com/group/cake-php/browse_thread/thread/2c01cf7cf5c36843?hl=en The key is the Pages controller. Pages are static pages whose templates are in the views/templates directory. They do not have controllers, or

Re: New User

2008-05-21 Thread aranworld
, aranworld [EMAIL PROTECTED] wrote: There is a very similar discussion thread posted yesterday here:http://groups.google.com/group/cake-php/browse_thread/thread/2c01cf7c... The key is the Pages controller. Pages are static pages whose templates are in the views/templates directory. They do

Re: Auth Allow Problem

2008-05-19 Thread aranworld
Auth Component will break if you try to allow 'login'. On May 19, 1:50 am, Crazy [EMAIL PROTECTED] wrote: I just started looking into the auth component, I don't need ACL's or anything, all I need is simple authentication and a small form where someone can make an account. Everything works

Re: Rendering an element from controller how to give params?

2008-05-18 Thread aranworld
I'm not sure why you would need to render an element from within a controller? As far as I know this is not the intended purpose of elements. If this is a controller method called via AJAX then I believe you should be rendering a view. In the view file, you then include the element you want to

Re: ACL Problems

2008-05-17 Thread aranworld
If you are using CakePHP 1.2, you should be using the following type of syntax: cake acl grant department-1 Employeelist * In this case, your aro table would have to have a row with an alias of department-1 and the aco table would have to have a row with an alias of Employeelist. -Aran On May

Re: 1.2 auth from cookbok only able to work if Security.salt set to empty ...

2008-05-11 Thread aranworld
Maybe you didn't use the salt when setting the password value in the database? You have to do something like this: INSERT INTO `users` SET `password` = sha1( 'passwordstringSALTSTRING') On May 11, 12:10 am, Andras Kende [EMAIL PROTECTED] wrote: Hello, I was able to add 1.2 auth from the

Re: Auth Problems

2008-05-11 Thread aranworld
In my 'Users' controller I do this: beforeFilter() { $this-Auth-allow(array('logout') ); parent::beforeFilter(); } function login() {} function logout() { $this-Auth-logout(); $this-flash(You are now logged out of the site., '/' ); } I don't know if this is correct, but it

Re: What kind of authentication script?, tutorial? do you use?

2008-05-09 Thread aranworld
I have been using the AuthComponent and the ACL Component together using Auth's 'crud' mode. It works great, and like mentioned above, I am very glad to know that a core update isn't going to break it. A lot of the bugs that plagued the Auth and ACL 6+ months ago are gone, and it is pretty

Re: Is the documentation at book.cakephp.org open source?

2008-05-07 Thread aranworld
I really enjoy contributing to the official Cake Book, however, it is a very serious problem that the contribution and editing process is so obscure. The black box model absolutely does not work and significantly reduces the incentive to contribute. I have personally spent a lot of time working

Re: Is the documentation at book.cakephp.org open source?

2008-05-07 Thread aranworld
view the editing history of current sections, then we could get an idea of what type of style you are looking for. -Aran On May 7, 8:44 am, John David Anderson [EMAIL PROTECTED] wrote: On May 7, 2008, at 9:24 AM, aranworld wrote: I really enjoy contributing to the official Cake Book

Re: Is the documentation at book.cakephp.org open source?

2008-05-07 Thread aranworld
the documentation would be in an SVN repo, which volunteer contributors would checkout. Submitted changes would be in the form of diff files? -Aran On May 7, 9:38 am, John David Anderson [EMAIL PROTECTED] wrote: On May 7, 2008, at 10:09 AM, aranworld wrote: It really helped with the ACL

Re: Init ACL with CLI?

2008-04-25 Thread aranworld
1) The syntax in the end is correct. You could also do: cake acl create aro root superadmin 2) When you create a node in the CLI, the model and foreign_key fields are blank. If you want these fields added automatically, then you need to add the nodes from within your application using the

Re: Cake 1.2 final release date

2008-04-25 Thread aranworld
For the last few months I have been using the nightly build. It is pretty stable. If you follow the change log, it has been a while since any application breaking syntax changes have been introduced. And looking at the bug list in trac, I wouldn't say there are any major changes in the

Re: Changing username of Authenticated user

2008-04-24 Thread aranworld
What about this? 1) after saving new database info, write new username / password to a cookie 2) destroy current session data 3) autologin using the information from the cookie This page should help a bit:

Re: Can I use AuthComponent without ACL and existing User Table

2008-04-24 Thread aranworld
I made a number of tutorials focused on ACL. This one should help you understand the relationship between the AuthComponent and the AclComponent: http://aranworld.com/article/164/cakephp-acl-tutorial-auth-component-example On Apr 24, 7:03 am, bingo [EMAIL PROTECTED] wrote: Great... Thanks

Re: Does CakePHP's ACL have anything like Zend_Acl's Assert functionality?

2008-04-24 Thread aranworld
Here is one way you could do a time limited ACO. Let's say you wanted to limit update access to a comment: 1) when comment is created, create an ACO that is bound to that comment 2) grant the user permission to update that particular comment 3) in the controller, before presenting the edit

Controller variables VS. Configure::write()

2008-04-24 Thread aranworld
So, let's say I want to set a flag that determines whether or not a login link should be displayed if a visitor to my site is not logged in. Which is the more cake friendly way to do this? // put this in my AppController var $displayLoginLink = TRUE; OR // put this in my bootstrap.php

Re: Why custom model functions inside plugin models are not called?

2008-04-23 Thread aranworld
Thanks. I knew I was doing something slightly wrong, but since what I had worked, I sort of left it alone. -Aran On Apr 22, 2:14 pm, biesbjerg [EMAIL PROTECTED] wrote: Hi Aranworld, You should use var $belongsTo = array('Comment' = array('className' = 'PluginName.Comment')) On Apr 22

  1   2   >