You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Michael Boss <ba...@googlemail.com> on 2006/09/21 15:03:52 UTC

Still problem with Security Constraints for Fragment

Hi All,

I somehow already asked this question here, but something does not
turn out in any way.
I have created a user (testuser), has assign to this user a group
(testgroup) and profile (group-fallback). Further has edited a
WEB-INF\pages\Public\public.psml:

<fragment id="ps-1000" type="layout"
name="jetspeed-layouts::VelocityTwoColumns">
    <fragment id="ps-1001" type="portlet" name="rss::RSS">
      <property layout="TwoColumns" name="row" value="0" />
      <property layout="TwoColumns" name="column" value="0" />
      <security-constraint>
          <groups>engineering</groups>
          <permissions>view</permissions>
      </security-constraint>
</fragment>

Apparently from this code, the access to this portlet (rss) has the
group "engineering".
However strange this portlet is visible to the testuser, but on idea should not.

If I rewrite condition so:
<security-constraint>
          <groups>testgroup</groups>
          <permissions>view</permissions>
</security-constraint>

It as does not work and the portlet will be visible to all users.
What is wrong here? Any idea?

Many thanks

Mark McCullough wrote:
> You have to define which psml's each group gets to see by dropping those
> psmls into the group folder in the pages directory. Then go to portal admin
> and assign each group member the profile of 'group-fallback'.
> For example, you want group A to see portlet A under page A, and you want
> group B to see portlet B under page A.
> -mark-

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


Re: Still problem with Security Constraints for Fragment

Posted by Michael Boss <ba...@googlemail.com>.
Hallo Ludovic,

You are right, it work! Many thanks to you :)

2006/9/21, chungue@polytech.unice.fr <ch...@polytech.unice.fr>:
>
> >>
> >> <fragment id="ps-1000" type="layout"
> >> name="jetspeed-layouts::VelocityTwoColumns">
> >>     <fragment id="ps-1001" type="portlet" name="rss::RSS">
> >>       <property layout="TwoColumns" name="row" value="0" />
> >>       <property layout="TwoColumns" name="column" value="0" />
> >>       <security-constraint>
> >>           <groups>engineering</groups>
> >>           <permissions>view</permissions>
> >>       </security-constraint>
> >> </fragment>
> >>
>
> Try encapsulating your <security-constraint> inside <security-constraints>
> tags. Also make sure you close correctly your <fragment> tags (looks like
> one is missing)
>
> On a side note: from my testings, you cannot insert those constraints
> inside Layout Fragments, which could have been useful. At least, it didn't
> work for me. But what you're trying to achieve is working pretty well for
> me.
>
> HTH,
> Ludovic
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Still problem with Security Constraints for Fragment

Posted by ch...@polytech.unice.fr.
>>
>> <fragment id="ps-1000" type="layout"
>> name="jetspeed-layouts::VelocityTwoColumns">
>>     <fragment id="ps-1001" type="portlet" name="rss::RSS">
>>       <property layout="TwoColumns" name="row" value="0" />
>>       <property layout="TwoColumns" name="column" value="0" />
>>       <security-constraint>
>>           <groups>engineering</groups>
>>           <permissions>view</permissions>
>>       </security-constraint>
>> </fragment>
>>

Try encapsulating your <security-constraint> inside <security-constraints>
tags. Also make sure you close correctly your <fragment> tags (looks like
one is missing)

On a side note: from my testings, you cannot insert those constraints
inside Layout Fragments, which could have been useful. At least, it didn't
work for me. But what you're trying to achieve is working pretty well for
me.

HTH,
Ludovic


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


Re: Still problem with Security Constraints for Fragment

Posted by Michael Boss <ba...@googlemail.com>.
P.S.
Is it really necessary to be the magician in order to make it?
In fact it should be very simple base operation, without which portal any
more a portal.
And it turns out on the contrary.


2006/9/21, Michael Boss <ba...@googlemail.com>:
>
> Hi All,
>
> I somehow already asked this question here, but something does not
> turn out in any way.
> I have created a user (testuser), has assign to this user a group
> (testgroup) and profile (group-fallback). Further has edited a
> WEB-INF\pages\Public\public.psml:
>
> <fragment id="ps-1000" type="layout"
> name="jetspeed-layouts::VelocityTwoColumns">
>     <fragment id="ps-1001" type="portlet" name="rss::RSS">
>       <property layout="TwoColumns" name="row" value="0" />
>       <property layout="TwoColumns" name="column" value="0" />
>       <security-constraint>
>           <groups>engineering</groups>
>           <permissions>view</permissions>
>       </security-constraint>
> </fragment>
>
> Apparently from this code, the access to this portlet (rss) has the
> group "engineering".
> However strange this portlet is visible to the testuser, but on idea
> should not.
>
> If I rewrite condition so:
> <security-constraint>
>           <groups>testgroup</groups>
>           <permissions>view</permissions>
> </security-constraint>
>
> It as does not work and the portlet will be visible to all users.
> What is wrong here? Any idea?
>
> Many thanks
>
> Mark McCullough wrote:
> > You have to define which psml's each group gets to see by dropping those
> > psmls into the group folder in the pages directory. Then go to portal
> admin
> > and assign each group member the profile of 'group-fallback'.
> > For example, you want group A to see portlet A under page A, and you
> want
> > group B to see portlet B under page A.
> > -mark-
>