Re: Auth Component; Strange behavior
Pablito was correct, there was a conflict in my code. I had a custom helper to handle ckeditor and it was causing the conflict. On Monday, March 11, 2013 7:56:19 PM UTC-4, cricket wrote: > Define "Auth Component does not work". If Auth is allowing access then > what else do you need? Could this be a routing issue? Are you using > admin prefixes? > > (It's been a long day so I may well be missing something obvious here.) > > On Mon, Mar 11, 2013 at 5:15 AM, Ed Propsner > > > wrote: > > Using Cake 2.2.5 > > > > My app is exhibiting a strange behavior in one of my controller/views. I > > have $this->Auth->allowedActions = array('view', 'index'); defined in > the > > beforeFilter of one of my controllers. When an authenticated user > navigates > > to the index view, Auth Component does not work on that page. Removing > > 'index' from allowedActions gets Auth Component working but then does > not > > allow public access to that view. This is the only controller/view > > exhibiting this behavior, all others work fine. > > > > Any idea what could be going on here? > > > > - ED > > > > -- > > 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+u...@googlegroups.com . > > To post to this group, send email to cake...@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. > > > > > -- 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: Paginate with drag / drop
On Mon, Mar 11, 2013 at 6:54 PM, Advantage+ wrote: > I have a site where the paginated results need to have the ability to sort / > re-order as the admin likes. Problem is how do you get something from page 2 > back to page 1 since you can't drag / drop it in a list that you cannot see. > > > > I was hoping there was a way to offset the pagination so for example (offset > by 1) so last record and first record get repeated so the option of moving > to another page is an option. > > page 1 shows 1 - 11 > > page 2 shows 11 - 21 > > page 3 shows 21 - 31 > > > > So in theory you could take record 21 drag to 11 spot go to page 1 and still > see it so you overlap the records by 1 or whatever number. > > > > Or any other ideas? Yes, tell the client that drag-reordering isn't going to happen unless everything's on one page. That said, I can't see anything _technically_ wrong with your idea. It'd be unwieldy for large changes in order. I've done crazier things. You'd need to modify the pagination params in $this->request. Might as well do that in beforeFilter. -- 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: Need a help for cakephp controller,
That's quite a vague request. Have you read the documentation? On Mon, Mar 11, 2013 at 12:55 PM, Ganapathi Raman wrote: > hi all > >i am a new to the cake php...can anyone help me for how to learn > controller method's.please please, > > -- > 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. > > -- 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: Auth Component; Strange behavior
Define "Auth Component does not work". If Auth is allowing access then what else do you need? Could this be a routing issue? Are you using admin prefixes? (It's been a long day so I may well be missing something obvious here.) On Mon, Mar 11, 2013 at 5:15 AM, Ed Propsner wrote: > Using Cake 2.2.5 > > My app is exhibiting a strange behavior in one of my controller/views. I > have $this->Auth->allowedActions = array('view', 'index'); defined in the > beforeFilter of one of my controllers. When an authenticated user navigates > to the index view, Auth Component does not work on that page. Removing > 'index' from allowedActions gets Auth Component working but then does not > allow public access to that view. This is the only controller/view > exhibiting this behavior, all others work fine. > > Any idea what could be going on here? > > - ED > > -- > 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. > > -- 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: component and helper to access model, good practice?
The built-in ACL functionality would be the best approach. See here: http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1 That tutorial is for an older version of Cake but the differences are moderate. And see this one for some ideas for being able to check access from within your views: http://net.tutsplus.com/tutorials/php/how-to-use-cakephps-access-control-lists/ On Mon, Mar 11, 2013 at 11:26 AM, Mohammad Naghavi wrote: > Hi All, > I know that this question has possibly been asked multiple times, I have > been searching for a right answer during the last days and did not find a > proper one. in addition to that most of the answers I found were related to > older versions of the CakePHP and now I want what does the new Cake offer. > > the problem is that I have a functionality which is based on multiple models > and controllers so that these controllers and models change the > functionality properly. Now I need to have a component and a helper which > have to use that functionality too. Now the question is where shall I put > the code which is used by my helper and component? in controller or in > model? > > to be concrete I have following models: User, Group and Permission where > User HABTM Group, Group HABTM Permission. I have the controllers > (accompanying their views) for adding, removing, signing in/out, assigning > the Users to Groups and Permissions to Groups. Now I need a component for > core Auth component to authorize the User's access to resources (based on > controller, action and some times even object based) and I need a helper to > filter out the not authorized links. I need also this authorization logic at > some other places inside other controllers too (for example to if a used is > allowed to do some thing at all or not). and the question is where shall > this authorization logic reside? multiple copies inside helper and component > and also in model? or all in one place (I can just imagine the User model) > and always access that? in this case is the access to model inside helper > and component not discouraged? > > thanks for any idea and help to solve this problem. > > regards, > Mohammad > > -- > 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. > > -- 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.
Paginate with drag / drop
I have a site where the paginated results need to have the ability to sort / re-order as the admin likes. Problem is how do you get something from page 2 back to page 1 since you can't drag / drop it in a list that you cannot see. I was hoping there was a way to offset the pagination so for example (offset by 1) so last record and first record get repeated so the option of moving to another page is an option. page 1 shows 1 - 11 page 2 shows 11 - 21 page 3 shows 21 - 31 So in theory you could take record 21 drag to 11 spot go to page 1 and still see it so you overlap the records by 1 or whatever number. Or any other ideas? Thanks, Dave -- 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.
CakeDC User Plugin & Facebook Plugin (webtechnick)
Hi all. I use two Plugins ( CakeDC User and the webtechnick Facebook Plugin) and try to get them working together. My Problem is when I login via the Facebook Plugin the User from the Users Plugin (Table field facebook_id) is not updated and I have no permission to get into various pages... Anyway, if I do a login (Users Plugjin) after the FB login the content of the table field is filled with the fb user id. I used the model key ('Facebook.Connect' => array('model' => 'Users.User') in the component array of the app_controller (changelog version 3.0.1) Could somebody give me a little hint about my problem or could share some experience how these two plugins work together. Thanks in advance. Cheers, Micha -- 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: Using the Global Event Manager
Boris, Thank you for your reply. Very helpful. I'll give it a try. Jerry On Monday, March 11, 2013 5:39:01 AM UTC-4, Борислав Събев wrote: > > Hey, Jerry. > > You could use bootstrap.php for such event attachments. > What I usually do is to create another file, in the Config folder, called > evenmanagement.php for example, and include it at the end of bootstrap.php. > This way all my events-subscribers etc. logic is in one file. > > You could also put it in AppController, but the method described is > somewhat cleaner. > You could also attach these bindings just for parts of the applications, > but you will need to be very careful of what you do. > > Borislav. > On Sunday, 10 March 2013 21:57:47 UTC+2, Jerry Kita wrote: >> >> Hi, >> >> I'm somewhat new to CakePHP but working to get up to speed quickly. >> >> I'm trying to understand the Events Systems. I've been able to successful >> create events, define listeners, attach listeners and receive event objects >> all within the same Model-Controller-Class. It works well and I've >> managed to get comfortable with it. I've create a ProductsController and >> within that class everything works well. >> >> What I would like to do is define an event in Model-Controller-Class 'A' >> (Product) and create a listener in Model-Controller-Class 'B' (Order). The >> net effect would be that an event object is created as a result of some >> action within 'A' and that event object is passed to 'B'. 'A' to 'A' or 'B' >> to 'B' I can manage. >> >> I've read about the Global Event Manager and that would seem to be the >> ticket. However, the documentation doesn't provide a newcomer like me >> sufficient depth to get it right. The documentation suggests the following: >> >> // In any configuration file or piece of code that executes before the >> eventApp::uses('CakeEventManager', >> 'Event');CakeEventManager::instance()->attach($aCallback, >> 'Model.Order.beforePlace'); >> >> So what configuration file or piece of code is recommended? AppController? >> And where does the function go? In the same file? As you can see >> the answer is not obvious enough to me to figure it out and I can't find any >> examples on the internet. >> >> Any suggestions of links or tutorials or hints would be appreciated. If I've >> not provided enough enough information I'm happy to provide >> that too! >> >> Thanks, Jerry >> >> >> -- 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: how to get the array value in view
Ok, I have figured it out. Thank you so much. On Mon, Mar 11, 2013 at 10:03 AM, Ganapathi Raman wrote: > > Hi, > > once again to check your foreach method > > > > > > > On Mon, Mar 11, 2013 at 4:31 AM, Joseph zhu wrote: > >> Hi there: >> It didn't show either, do you have more ideas about it? >> Thank you. >> Have a good weekend. >> >> On Sat, Mar 9, 2013 at 3:01 PM, lowpass wrote: >> >>> On Sat, Mar 9, 2013 at 2:40 AM, Joseph zhu >>> wrote: >>> > >>> > In the view,I use >>> > >>> > >>> > >>> > but I can't get the value for field Curriculum.title >>> > how to get the value for filed Curriculum.title. >>> >>> Sorry, I thought you meant that you wanted to extract just those >>> values. To print them from a loop, you need to do: >>> >>> foreach($coursedatas['Curriculum'] as $curriculum) >>> { >>> echo $curriculum['title']; >>> >>> Notice that the multiple arrays are under the Curriculum key. >>> >>> -- >>> 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 a topic in the >>> Google Groups "CakePHP" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/cake-php/lbe7g3BHgeQ/unsubscribe?hl=en >>> . >>> To unsubscribe from this group and all its topics, 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. >>> >>> >>> >> >> >> -- >> God bless you! >> Joseph >> >> -- >> 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. >> >> >> > > -- > 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 a topic in the > Google Groups "CakePHP" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/cake-php/lbe7g3BHgeQ/unsubscribe?hl=en. > To unsubscribe from this group and all its topics, 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. > > > -- God bless you! Joseph -- 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.
Need a help for cakephp controller,
hi all i am a new to the cake php...can anyone help me for how to learn controller method's.please please, -- 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: how to get the array value in view
Hi, once again to check your foreach method On Mon, Mar 11, 2013 at 4:31 AM, Joseph zhu wrote: > Hi there: > It didn't show either, do you have more ideas about it? > Thank you. > Have a good weekend. > > On Sat, Mar 9, 2013 at 3:01 PM, lowpass wrote: > >> On Sat, Mar 9, 2013 at 2:40 AM, Joseph zhu wrote: >> > >> > In the view,I use >> > >> > >> > >> > but I can't get the value for field Curriculum.title >> > how to get the value for filed Curriculum.title. >> >> Sorry, I thought you meant that you wanted to extract just those >> values. To print them from a loop, you need to do: >> >> foreach($coursedatas['Curriculum'] as $curriculum) >> { >> echo $curriculum['title']; >> >> Notice that the multiple arrays are under the Curriculum key. >> >> -- >> 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 a topic in the >> Google Groups "CakePHP" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/cake-php/lbe7g3BHgeQ/unsubscribe?hl=en. >> To unsubscribe from this group and all its topics, 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. >> >> >> > > > -- > God bless you! > Joseph > > -- > 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. > > > -- 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: Auth Component; Strange behavior
Still learning Cake but maybe you have some code conflicting with auth on your AppController beforeFilter? Happened to me when trying out the Auth component. Pablo. On Monday, March 11, 2013 6:15:02 AM UTC-3, CrotchFrog wrote: > > Using Cake 2.2.5 > > My app is exhibiting a strange behavior in one of my controller/views. I > have $this->Auth->allowedActions = array('view', 'index'); defined in the > beforeFilter of one of my controllers. When an authenticated user navigates > to the index view, Auth Component does not work on that page. Removing > 'index' from allowedActions gets Auth Component working but then does not > allow public access to that view. This is the only controller/view > exhibiting this behavior, all others work fine. > > Any idea what could be going on here? > > - ED > -- 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.
Need help with $this->paginate() in controller
I need some help on implementing the below query for $this->paginate() SELECT * FROM `table1` WHERE name like '%n3%' AND code NOT IN ( SELECT code FROM table2 ) UNION SELECT * FROM table2 where name like '%n3%' I want to get the paged resultset and count value also. -- 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: Memcached Pool
ok, solved it myself. The error was actually being generated on a PHP level in from php-pecl-memcache. Turns out this library is less capable than php-pecl-memcache*d*, so using that rather. And now pooling is handled correctly. sorry for the noise, Michael -- 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.
Memcached Pool
Hi, I noticed that Cakephp gives an error message if one of the servers in a memcached pool is missing: For example, two server in a pool. One is up, the other down, gives this error, even though the one server in the pool is available. *Notice* (8): MemcachePool::get() [http://php.net/memcachepool.get]: Server 192.168.2.254 (tcp 11211, udp 0) failed with: Connection timed out (110) [*CORE/cake/libs/cache/memcache.php*, line *150*] One of the reasons for a pool of memcached daemons is redundancy. So, having one of the servers down shouldn't be a problem - and shouldn't generate errors. Is this currently possible in Cakephp? or would I need to patch this myself? Or am I missing something? Michael -- 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.
component and helper to access model, good practice?
Hi All, I know that this question has possibly been asked multiple times, I have been searching for a right answer during the last days and did not find a proper one. in addition to that most of the answers I found were related to older versions of the CakePHP and now I want what does the new Cake offer. the problem is that I have a functionality which is based on multiple models and controllers so that these controllers and models change the functionality properly. Now I need to have a component and a helper which have to use that functionality too. Now the question is where shall I put the code which is used by my helper and component? in controller or in model? to be concrete I have following models: User, Group and Permission where User HABTM Group, Group HABTM Permission. I have the controllers (accompanying their views) for adding, removing, signing in/out, assigning the Users to Groups and Permissions to Groups. Now I need a component for core Auth component to authorize the User's access to resources (based on controller, action and some times even object based) and I need a helper to filter out the not authorized links. I need also this authorization logic at some other places inside other controllers too (for example to if a used is allowed to do some thing at all or not). and the question is where shall this authorization logic reside? multiple copies inside helper and component and also in model? or all in one place (I can just imagine the User model) and always access that? in this case is the access to model inside helper and component not discouraged? thanks for any idea and help to solve this problem. regards, Mohammad -- 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: Many to many relations and Froms
Hi Marco, no, it dont help in any way because i don't ask for fixtures on n2n-Models. I ask how i can use it in a Controller and how i use it in a view for viewing, creating and editing a new records for the above example. Best regards, Kai. -- 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: Many to many relations and Froms
This article with help you http://blog.endpoint.com/2009/11/test-fixtures-for-cakephp-has-and.html -- 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.
Many to many relations and Froms
Hi! I have a problem understanding "n-to-m" relations and how to integrate it in a view (inputform and showing content). Following situation: table zoos fields: id, name table animals fields: id, name table zootoanimalmappings fields: id, zoo_id, animal_id Now i wan't top create a view where i can enter: Zooname All Animals that resists in that zoo But i dont know how to do this in a view and what the controller have to do (i think it have to select/set all posible animals for the view...but how do i put it in the data-array for later saving?). Thanks for your help! Best regards, Kais. -- 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: Using the Global Event Manager
Hey, Jerry. You could use bootstrap.php for such event attachments. What I usually do is to create another file, in the Config folder, called evenmanagement.php for example, and include it at the end of bootstrap.php. This way all my events-subscribers etc. logic is in one file. You could also put it in AppController, but the method described is somewhat cleaner. You could also attach these bindings just for parts of the applications, but you will need to be very careful of what you do. Borislav. On Sunday, 10 March 2013 21:57:47 UTC+2, Jerry Kita wrote: > > Hi, > > I'm somewhat new to CakePHP but working to get up to speed quickly. > > I'm trying to understand the Events Systems. I've been able to successful > create events, define listeners, attach listeners and receive event objects > all within the same Model-Controller-Class. It works well and I've > managed to get comfortable with it. I've create a ProductsController and > within that class everything works well. > > What I would like to do is define an event in Model-Controller-Class 'A' > (Product) and create a listener in Model-Controller-Class 'B' (Order). The > net effect would be that an event object is created as a result of some > action within 'A' and that event object is passed to 'B'. 'A' to 'A' or 'B' > to 'B' I can manage. > > I've read about the Global Event Manager and that would seem to be the > ticket. However, the documentation doesn't provide a newcomer like me > sufficient depth to get it right. The documentation suggests the following: > > // In any configuration file or piece of code that executes before the > eventApp::uses('CakeEventManager', > 'Event');CakeEventManager::instance()->attach($aCallback, > 'Model.Order.beforePlace'); > > So what configuration file or piece of code is recommended? AppController? > And where does the function go? In the same file? As you can see > the answer is not obvious enough to me to figure it out and I can't find any > examples on the internet. > > Any suggestions of links or tutorials or hints would be appreciated. If I've > not provided enough enough information I'm happy to provide > that too! > > Thanks, Jerry > > > -- 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.
Auth Component; Strange behavior
Using Cake 2.2.5 My app is exhibiting a strange behavior in one of my controller/views. I have $this->Auth->allowedActions = array('view', 'index'); defined in the beforeFilter of one of my controllers. When an authenticated user navigates to the index view, Auth Component does not work on that page. Removing 'index' from allowedActions gets Auth Component working but then does not allow public access to that view. This is the only controller/view exhibiting this behavior, all others work fine. Any idea what could be going on here? - ED -- 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.