Re: Only display text to a certain group

Tim Koop <[email protected]> Thu, 30 Aug 2007 13:14:52 -0600
Newsgroups gmane.comp.java.jspwiki.user
Message-ID <[email protected]>
Never mind.  I figured it out myself.  We are using Basic authentication 
through Apache and Tomcat, and I only need to know the user's name, so 
something like this works.

<% if ("SomeUser".equals(request.getRemoteUser())) { %>
Some html here...
<% } %>

Tim Koop




Tim Koop wrote:
> Wow, thanks everyone for the great advice!
>
> That IfPlugin is going to be really great.  Until then I threw a few 
> lines together to make a simple plugin for our specific needs, since 
> it was so easy.  I tip my hat to whoever designed the API.
>
> My next question is this: Is it possible to do something like this 
> inside the actual template jsp pages, like ViewTemplate.jsp?
>
> Thanks again.
>
> Tim Koop
>
>
>
>
> Tim Koop wrote:
>> We have a group that is only allowed to see certain pages, so we 
>> don't want the main menu to links to everything.
>>
>> I was thinking of maybe using a Plugin to only show links if the 
>> current user is in a specific group or not.  That way we could make a 
>> menu for the group members, and a menu for non-group members.  Is it 
>> currently possible to do something like this?  I'm willing to make a 
>> Plugin if I need to, but not if something is already out there.
>>
>> Thanks.
>>
>>
>> -- 
>> Tim Koop
>> _______________________________________________
>> This is the Jspwiki-users mailing list, in which we discuss the 
>> stable release (even-numbered, 2.4.x, 2.6.x), and user-issues. For 
>> development discussion, please join jspwiki-dev.
>> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
>> http://www.jspwiki.org/JSPWikiMailingList
>>
> _______________________________________________
> This is the Jspwiki-users mailing list, in which we discuss the stable 
> release (even-numbered, 2.4.x, 2.6.x), and user-issues. For 
> development discussion, please join jspwiki-dev.
> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
> http://www.jspwiki.org/JSPWikiMailingList
>