Hi Steven,

Monday, November 13, 2006, 12:47:21 PM, you wrote:

SG> Maxim Grigoriev wrote:
>> OK, i'll do it but at first i want to decribe it more detailed.
>> I have pages which can be viewed by anonymous users but when user
>> logins he sees this page with other elements. And when admin sees this
>> page then another element are visible.
>>   

SG> See these Wiki pages for a couple ways to do that; it's a very common need:

SG> http://rifers.org/wiki/display/RIFE/Conditionally+display+privileged+content
SG> http://rifers.org/wiki/display/RIFE/Blockvalue+scripting+support

SG> And you will also definitely want to read this:

SG> http://rifers.org/wiki/display/RIFE/User+identification+facility

Thank you for URL. I understood the way i should go but i've got
problems in implementation :)

I have Auth  and Iden element

<element id="AuthElement" extends="rife/authenticated/memory.xml">
        <property name="template_name">auth_login</property>
        <property name="role">admin</property>
        <property name="authvar_type">cookie</property>

        <submission name="credentials">
            <param name="login"/>
            <param name="password"/>
        </submission>

        <childtrigger name="authid"/>
        <incookie name="authid"/>
        <outcookie name="authid"/>

        <incookie name="rememberid"/>
        <outcookie name="rememberid"/>
    </element>

    <element id="IDENTIFIED" extends="rife/authenticated/identified.xml">
        <property name="authElementId">AuthElement</property>
        <property name="authvar_type">cookie</property>
        <childtrigger name="authid"/>
        <incookie name="authid"/>
        <outcookie name="authid"/>
    </element>

<group inherits="AuthElement">
        <element implementation="com.frnews.web.rife.component.admin.AdminHome">
            <exit name="logout"/>
            <flowlink srcexit="logout" destid="Logout"/>
        </element>
        <element 
implementation="com.frnews.web.rife.component.admin.SecondAdmin">
            <exit name="Logout"/>
        </element>
    </group>    

But getRequestAttribute(Identified.IDENTITY_ATTRIBUTE_NAME)
returns right ident for AdminHome and SecondAdmin but for all other
elements it returns always null.
As i understand role information is avaliable only for auth group ?
How can i make that some pages will be show only for logined users but
another ones will be shown for all users but with some details for
logined users? And user shouldn't relogin when he goes from one
restricted page to another common page.
Should i create 2 Auth Elements or what should i do ?




-- 
Best regards,
 Maxim                            mailto:[EMAIL PROTECTED]

_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to