Well it depends.....
I had these configurations :
 - no modifications possible (even admin)
 - per user setting
 - per origin (network information : intranet, extranet, internet)


Matt Raible-3 wrote:
> 
> What do other users think? Is it better to have it the current way
> (changeable by admins for whole site) or as a per-user setting.  Or
> both?  I'm open to change.
> 
> Matt
> 
> On 9/7/06, Dodo <[EMAIL PROTECTED]> wrote:
>> Thank Matt, it works.
>>
>> Changing theme may not be desired in production site but it sure
>> is eye candy for demo purposes ;)
>>
>> Sam
>>
>> ----- Original Message -----
>> From: "Matt Raible" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Friday, September 08, 2006 3:28 AM
>> Subject: Re: [appfuse-user] change theme without being admin
>>
>>
>> > It should be possible.  In LocaleFilter, try changing:
>> >
>> >        String theme = request.getParameter("theme");
>> >        if (theme != null && request.isUserInRole(Constants.ADMIN_ROLE))
>> {
>> >            Map config = (Map)
>> > getServletContext().getAttribute(Constants.CONFIG);
>> >            config.put("theme", theme);
>> >        }
>> >
>> > To:
>> >
>> >        String theme = request.getParameter("theme");
>> >        if (theme != null) {
>> >            Map config = (Map)
>> > getServletContext().getAttribute(Constants.CONFIG);
>> >            Map sessionConfig = new HashMap(); // put in user's
>> > session so it's not site-wide
>> >            sessionConfig.putAll(config);
>> >            sessionConfig.put("theme", theme);
>> >            request.getSession().setAttribute(Constants.CONFIG,
>> > sessionConfig);
>> >        }
>> >
>> > Hope this helps/works,
>> >
>> > Matt
>> >
>> > On 9/7/06, Dodo <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi,
>> >> How do I allow user to change theme without being logged in as admin?
>> So
>> >> user can simply click on a link with "theme=blaa"
>> >> appended on the link's URL
>> >>
>> >> Is this possible?
>> >>
>> >> Thanks
>> >>
>> >> Sam
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/change-theme-without-being-admin-tp6190504s2369p14997478.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to