Re: Check if permission is inherited
Hi Thanks for your answer. I was hoping that there is a internal function in Acl to accomplish this. Do you have a code example for a custom function to check inheritance? Regards, Frank -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Check if permission is inherited
Recently I have been "rolling my own" to get this. I came up with a process, the work is proprietary My suggestion would be to look into the using the Aro's (user/group) getPath and using the IDs to look up the specific permissions (aros_acos table) . From there you can look up your Aco data and see where the permission records line up - giving you if they are inherited or not based on the parent_id in the Acos. I did a lot of digging in the Libs to get this idea out, and was able to bypass looking up each and every permission for each ARO/ACO pair. Kind of a convoluted process and not very clear on my part, I'm sure, but for now it's all I can offer. I'll try to keep an eye on this thread and help where i can, the permissions certainly aren't an easy thing to tackle. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Solution for CakePHP newbies who are stuck with messages like - Error: PostController could not be found
CakePHP requires that you understand PHP. The fact that you didn't know that is unsettling. On Saturday, November 24, 2012 12:53:19 PM UTC-8, Mike Pritchard wrote: > > I struggled with the problems described in messages from new CakePHP > users. The Cake install looked OK, but when I went through the Blog Adding > a Layer tutorial I'd get these kinds of messages. > > Error: PostController could not be found > Error: Create the class PostController below in file: > app/Controller/PostsController.php > > After reading lots of threads, going through the tutorial again and again, > reinstalling, checking mod_rewrite, etc., I finally figured it out. So > hopefully this will help others. > > The Cakewalk tutorials omit to mention that the php files need to start > with this was correct - part of the Cakewalk process. And also discovered that > the php files that start with . > > When I added the everything started working! I've been able to finish the tutorial and even > extend it a little. > > Onward and upward. > MIke > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Check if permission is inherited
Hi Acl->check() "only" returns if a permission is granted or not. Is there a way to check (for a single element) if the permission is directly granted/denied or just inherited? Thanks, Frank -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Should validation 'allowEmpty' be removed?
I've encountered many new CakePHP users that were a bit confused by the 'allowEmpty' option in validation rules. Thinking about this issue, I must say that I agree. 'allowEmpty' is confusing because it's both an 'option' for a validation rule (it can be combined with another rule), *and *can be used as a 'validation rule' on itself. When it *is* used on itself, it seems to duplicate the 'notEmpty()' Core Validation Rule (). Another side-effect of the 'allowEmpty' option, is that (by default) it doesn't work in combination with custom validation rules (http://stackoverflow.com/questions/15570376/custom-validation-is-not-taking-allowempty-option) If I'm not overlooking things, all validate arrays below basically do the same: public $validate = array( 'name' => array( 'allowEmpty' => false, ); ); // Simple notation, no options provided public $validate = array( 'name' => 'notEmpty'; ); // Array notation, no options provided public $validate = array( 'name' => array( 'rule' => 'notEmpty' ); ); My suggestion is to remove the 'allowEmpty' option. (or at least make sure that it is taken into account for custom validation-methods on a Model). If this option is to be removed, an exception should be thrown that a deprecated option is used to prevent users from unwanted behavior :) I'm new to this group (not new to CakePHP), so I don't know if this is the proper channel to make feature requests/suggestions in this location. If not, hints on where to file these kind of requests are welcome! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.