[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jetspeed-user
Subject:    RE: How to set Security for Portlets ?
From:       "Sunil Sheshadri" <ssheshad () cisco ! com>
Date:       2003-01-30 8:48:41
[Download RAW message or body]

Thanks Shiva kumar,
It's working.

Regards,
Sunil P S.
Off: 5010261 (extn :2261)
Res: 3329038


-----Original Message-----
From: Shiva Kumar T [mailto:shiva_t@infosys.com]
Sent: Thursday, January 30, 2003 1:45 PM
To: Jetspeed Users List
Subject: RE: How to set Security for Portlets ?


In the security.xreg you can define
one more access element as below for role2.
Still you will have the same name role1-Only in your portlets.xreg.

    <security-entry name="role1-Only">
        <meta-info>
            <title>role1-only</title>
            <description>Full access to user with the manager
role.</description>
        </meta-info>
        <access action="*">
            <allow-if role="role1"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:org.apache.jetspeed.om.registry.base.BaseSecurityAllow"/>
        </access>
        <access action="*">
            <allow-if role="role2"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:org.apache.jetspeed.om.registry.base.BaseSecurityAllow"/>
        </access>
    </security-entry>


Regards
shiva

-----Original Message-----
From: sunil_ps(INT)
Sent: Thursday, January 30, 2003 1:34 PM
To: 'Jetspeed Users List'
Subject: RE: How to set Security for Portlets ?


But if i have to give both role1 and role2 to a single portlet how to set
that?

Regards,
Sunil P S.
Off: 5010261 (extn :2261)
Res: 3329038


-----Original Message-----
From: Shiva Kumar T [mailto:shiva_t@infosys.com]
Sent: Thursday, January 30, 2003 1:13 PM
To: Jetspeed Users List
Subject: RE: How to set Security for Portlets ?


Add a security reference for Portlets (someportlet.xreg)with the parent as
the reference defined in security.xreg .


Please find the example below.

Say for portlet1 only role1 and admin have got all the rights and others
does n't have any rights.


This is for portlet1 done in portlets.xreg

    <portlet-entry name="Portlet1" hidden="false" type="ref"
        parent="CustomizerVelocity" application="false">

        <security-ref parent="role1-Only"/>

        <meta-info>
            <title>Weather</title>
            <description>Current weather conditions for a city</description>
        </meta-info>

<classname>org.apache.jetspeed.portal.portlets.CustomizerVelocityPortlet</cl
assname>
        <category group="Jetspeed">weather</category>
    </portlet-entry>

In security.xreg define the security reference as below.

    <security-entry name="role1-Only">
        <meta-info>
            <title>role1-only</title>
            <description>Full access to user with the manager
role.</description>
        </meta-info>
        <access action="*">
            <allow-if role="admin"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:org.apache.jetspeed.om.registry.base.BaseSecurityAllow"/>
        </access>
        <access action="*">
            <allow-if role="role1"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:org.apache.jetspeed.om.registry.base.BaseSecurityAllow"/>
        </access>
    </security-entry>




So role1 will have all the access to portlet1.

In the same way you can do for all other portlets by modifying your
security.xreg and portlet.xreg.


Thanx
Shiva






-----Original Message-----
From: sunil_ps(INT)
Sent: Thursday, January 30, 2003 12:30 PM
To: 'Jetspeed Users List'
Subject: How to set Security for Portlets ?


Hi,
I have two new roles defined in my application. role1 and role2

I have 4 portlets.
role1 has to access only 1 and 2 portlets.
but role2 has to have access to all 1,2,3,4 portlets. How to sent the roles
for the portlets ?


Regards,
Sunil P S.
Off: 5010261 (extn :2261)
Res: 3329038


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic