Hi Geert,
just a few seconds ago, I find the bug, I focused to strong on the ognl
which is new to me that I have not seen that I had a typo in the exit name.
Thanks a lot, and good luck for your lasik! Hope to see you soon an the
list.
Ciao
Matze
Geert Bevin wrote:
> Hi Matthias,
>
> I just checked in the jumpstart and it works.
>
> 1. add OGNL to the classpath
>
> 2. then modify resources/templates/pub/home.html by adding this to
> the content block:
> <r:v name="OGNL:ROLEUSER:rolex"/>
> <!--B 'OGNL:ROLEUSER:rolex:[[ isInRole("adminl") ]]'-->
> <li class="on">Administration</li>
> <!--/B-->
>
> 3. modify resources/sites/main.xml and remove the other globalcookie:
> <site>
> <globalcookie name="authid"/>
> <!-- public site -->
> <subsite id="Public" file="pub.xml" inherits="IDENTIFIED"/>
> <element id="IDENTIFIED" file="rife/authenticated/identified.xml">
> <property name="authElementId">.AuthAdminMemory</property>
> <childtrigger name="authid"/>
> </element>
>
> When you run this, you can go to http://localhost:8080/admin to log
> in. Then, go back to http://localhost:8080 and you'll see the <li>
> appear.
>
> Hope this helps,
>
> Geert
>
>
> On 18 Sep 2007, at 18:31, Matthias Barmeier wrote:
>
>> Hi Geert,
>>
>> sorry I were not precise enough. Yes, I can get the RoleUserIdentity.
>> If I check for the role in the backend it works perfect, but the ognl
>> does not work.
>>
>> If you say that this should work I have to look at my stuff harder. In
>> the past it was always me making the mistakes :).
>>
>> I will dig deeper. Thanks for your help.
>>
>> Ciao
>> Matze
>>
>> Geert Bevin wrote:
>>> What do you mean by 'available'? Sorry to be obtuse, but I prefer not
>>> to spend time looking at the wrong direction ;-)
>>>
>>> Does:
>>>
>>> RoleUserIdentity identity = (RoleUserIdentity)getRequestAttribute
>>> (Identified.IDENTITY_ATTRIBUTE_NAME);
>>>
>>>
>>> give a non-null identity in your element?
>>>
>>> On 18 Sep 2007, at 17:18, Matthias Barmeier wrote:
>>>
>>>> Hi,
>>>>
>>>> hmm, the role is available, you mean that this should work ??
>>>>
>>>> Ciao
>>>> Matze
>>>>
>>>>
>>>>
>>>> Geert Bevin schrieb:
>>>>> What doesn't work? At a first glance this should work ;-)
>>>>>
>>>>> Are you sure that this element is either identified (http://
>>>>> rifers.org/wiki/display/RIFE/User+identification+facility) or
>>>>> authenticated (the user's role needs to be available)?
>>>>>
>>>>> On 18 Sep 2007, at 16:40, Matthias Barmeier wrote:
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I would like to have some exits in my pages that are only
>>>>>> available
>>>>>> for
>>>>>> special roles. But my approach was a bit naive. I thought that
>>>>>> this
>>>>>> should work:
>>>>>>
>>>>>> <div id="main_nav">
>>>>>> <ul>
>>>>>> <li><a href="${v EXIT:QUERY:MonitoringList/}">Monitoring</
>>>>>> a></li>
>>>>>> <!-- <li><a href="#">Critical alerts</a></li>
>>>>>> -->
>>>>>> <r:v name="OGNL:ROLEUSER:rolex"/>
>>>>>> <!--B 'OGNL:ROLEUSER:rolex:[[ isInRole
>>>>>> ("customeradmin") ]]'-->
>>>>>> <li class="on"><a href='${v
>>>>>> EXIT:QUERY:SiteList/}'>Administration</a></li>
>>>>>> <!--/B-->
>>>>>> <r:v name="OGNL:ROLEUSER:roley"/>
>>>>>> <!--B 'OGNL:ROLEUSER:roley:[[ isInRole("admin") ]]'-->
>>>>>> <li class="on"><a href="${v
>>>>>> EXIT:QUERY:CustomerList/}">Administration</a></li>
>>>>>> <li><a href="terminals/terminals">System</a></li>
>>>>>> <!--/B-->
>>>>>> </ul>
>>>>>> </div>
>>>>>>
>>>>>> But it doesn't. :( Could someone give me a hint on how to do
>>>>>> what I
>>>>>> want ?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Ciao
>>>>>> Matze
>>>>>>
>>>>>>
>>>>> --
>>>>> Geert Bevin
>>>>> Terracotta - http://www.terracotta.org
>>>>> Uwyn "Use what you need" - http://uwyn.com
>>>>> RIFE Java application framework - http://rifers.org
>>>>> Music and words - http://gbevin.com
>>>>>
>>>>>
>>> --
>>> Geert Bevin
>>> Terracotta - http://www.terracotta.org
>>> Uwyn "Use what you need" - http://uwyn.com
>>> RIFE Java application framework - http://rifers.org
>>> Music and words - http://gbevin.com
>>>
>>>
>>>
>>
>
> --
> Geert Bevin
> Terracotta - http://www.terracotta.org
> Uwyn "Use what you need" - http://uwyn.com
> RIFE Java application framework - http://rifers.org
> Music and words - http://gbevin.com
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---