Indeed, both do work. @Matias, what I am doing is trying to customize views depending on the authorization level of the user viewing the system, or in one case, the authorization level of the user in question. I am using the othAuth component, and have 1=>Administrators, 2=>Supervisors, 3=>Moderators, 4=>Testers, and 5=>regular users as my permission levels, and one of the public links is a listing of all those with level 1-3, sorted in order of level, with titles ahead of each group, while another view is the main administration panel, and the <h1> tag at the top is specific to the level of the user viewing it, as are the links displayed on the page there. Thanks for the advice, both Matias, and francky06l
On Jan 29, 2008 7:23 PM, francky06l <[EMAIL PROTECTED]> wrote: > > or in beforeRender, sounds more logical for views but both work. > > On Jan 29, 6:50 pm, "Matias Lespiau" <[EMAIL PROTECTED]> wrote: > > I think you should be able set it in the AppController, something like: > > > > class AppController { > > > > function beforeFilter() { > > $this->set('roles', array('', 'Administrator', 'Supervisor', > > 'Moderator', 'Testing Team', '')); > > } > > > > } > > > > What are you trying to achieve? Maybe that would give us more ideas. > > > > Cheers, > > > > -- > > Matias Lespiauhttp://www.gignus.com/ > > > > On Jan 29, 2008 3:42 PM, Siebren Bakker <[EMAIL PROTECTED]> > wrote: > > > > > I have an array of Strings, that I use in a couple of different places > > > throughout my cake-app, in a couple different models, and was > wondering if > > > there was any way to declare the array such that it would be > accessible from > > > within any view, instead of having to declare the array for each view > that > > > uses it? > > > > > i.e., the array('', 'Administrator', 'Supervisor', 'Moderator', > 'Testing > > > Team', ''); > > > > > -- > > > In the name of Life, Liberty, and the pursuit of my sanity. > > > Siebren Bakker(Aevum Decessus) > > > -----BEGIN GEEK CODE BLOCK----- > > > Version: 3.12 > > > GCS d- s+: a19 C++++ UL++ P L++ > > > !E W++ N(-) o? K? w(+) O? M-- V? > > > PS+ PE Y- PGP- t+ 5? X- R tv-- > > > b++ Di D+ G+ e h! r y- > > > ------END GEEK CODE BLOCK------ > > > -- In the name of Life, Liberty, and the pursuit of my sanity. Siebren Bakker(Aevum Decessus) -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d- s+: a19 C++++ UL++ P L++ !E W++ N(-) o? K? w(+) O? M-- V? PS+ PE Y- PGP- t+ 5? X- R tv-- b++ Di D+ G+ e h! r y- ------END GEEK CODE BLOCK------ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---