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 Mansour <ma...@yahoo.com> on 2007/10/16 21:32:06 UTC

How to administer and set security for different entities of the same portlet?

I need two IFrames on the main page. One of them is editable by the user 
and the other one is not.
I need the guest user to be able to specify the URL for only one of 
these IFramesPortlet. How can I get this to work ?
I can not find any docs or guides about using (not developing) for 
jetspeed. Is there any documents like this ?


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


Re: How to administer and set security for different entities of the same portlet?

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Oct 16, 2007, at 12:32 PM, Mansour wrote:

> I need two IFrames on the main page. One of them is editable by the  
> user and the other one is not.
> I need the guest user to be able to specify the URL for only one of  
> these IFramesPortlet. How can I get this to work ?
> I can not find any docs or guides about using (not developing) for  
> jetspeed. Is there any documents like this ?
>
You can select the security constraint for a given page (or folder)  
from the Site Manager administrative portlet.
When logged in as admin, go to the "Portal Site Manager" tab.
Click on the page you want to modify, and then click on the security  
tab.
 From there select the security constraint you want to apply to the  
page and press Save.
What security constraint would you want to select to grant the guest  
user "edit" access?
Well, there isn't one "out of the box", but you can create one pretty  
easily with the Security Constraints administrative portlet.
When logged in as admin, go to the "Constraints" tab
Press New, enter the name of your constraint. I will call it  
"AllViewEdit"
 From the constraints editor, press "New", then click the "user" and  
"guest" roles, for Actions click "view,edit,help", press OK, then Save
Now you can go back to the Site Manager and use this constraint

I just realized I explained setting up a constraint for a page, not a  
portlet. Well, I guess that was a mistake, sorry.
Maybe the text above will be useful for someone ....

So you need to set the security constraint for a single portlet on a  
page, using the portal, not just editing the XML files.
Unfortunately this one is not possible, yet. We just added recently  
"edit-defaults" mode, but that does not include editing the security  
constraint for a single portlet.
So you have 3 options here:

1. edit the PSML as a part of your initial build, add the security  
constraint to the appropriate fragment

2. edit the PSML outside the build, import the file from the Site  
Manager

3. In your portlet.xml and jetspeed-portlet.xml extended deployment  
descriptor, define this IFrame as a standalone portlet, and give it a  
security constraint there

jetspeed-portlet.xml:
     <portlet>
         <portlet-name>MyFrame</portlet-name>
         <js:security-constraint-ref>AllEditView</js:security- 
constraint-ref>
     </portlet>

4. Enter a JIRA issue asking for a new feature to "configure" the  
security constraint on a particular portlet fragment



Re: How to administer and set security for different entities of the same portlet?

Posted by Mansour <ma...@yahoo.com>.
Mansour wrote:
> Ok, Maybe I should have put it in a different way. My fault.
> Let's say I need 2 instances of the same portlets (ie. IFrame). Only 
> One of them is to be visible by guest user. Both are visible by logged 
> in users.
> Q1- I am not be able to add the same portlet twice on the same page.
> Q2- how do I go around managing the security and permission to get 
> this scenario ?
>
I was able to add the same portlet multiple times to the same page. I 
had to delete j2-admin and jetspeed and let them be created again from 
the war file. I don't understand why, but it's working now !

I still need to figure out the second one.


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


Re: How to administer and set security for different entities of the same portlet?

Posted by Mansour <ma...@yahoo.com>.
I am not looking to modify PSML at all. The security config should me 
managed by the administrator. I am trying to do all this using j2-admin.



Woonsan Ko wrote:
> Hi Mansour,
>
>   
>> Let's say I need 2 instances of the same portlets (ie. IFrame). Only One 
>> of them is to be visible by guest user. Both are visible by logged in users.
>>     
> You can add two portlet entities in a page by adding two portlet fragments in the psml page.
> You can use portlet-selector page or edit the psml file manually.
> Also, you can set VIEW constraint on each portlet fragment. 
> (See http://portals.apache.org/jetspeed-2/guides/guide-psml.html#Portlet_Fragments for the
> detail.)
>
>   
>> Q1- I am not be able to add the same portlet twice on the same page.
>>     
> I cannot catch what you mean. You can add portlet entities with the same portlet as mentioned
> above.
>
>   
>> Q2- how do I go around managing the security and permission to get this 
>> scenario ?
>>     
> See http://portals.apache.org/jetspeed-2/guides/guide-psml.html#Portlet_Fragments for the detail.
>
> HTH,
>
> -Woonsan.
>
> --- Mansour <ma...@yahoo.com> wrote:
>
>   
>> Ok, Maybe I should have put it in a different way. My fault.
>> Let's say I need 2 instances of the same portlets (ie. IFrame). Only One 
>> of them is to be visible by guest user. Both are visible by logged in users.
>> Q1- I am not be able to add the same portlet twice on the same page.
>> Q2- how do I go around managing the security and permission to get this 
>> scenario ?
>>
>>
>>
>>
>>
>> Mansour wrote:
>>     
>>> Hi Woonsan,
>>> My question was how to manage and set the security permissions. 
>>> whether it's reasonable or not, this is not the question I need. All I 
>>> want is to understand how j2-admin works, and the step I need to give 
>>> the guest permissions.
>>> I am new to JS2 and trying to figure out how to administer and use it, 
>>> in other words this setup is not used in real live system. :)
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>>     
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>   


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


Re: How to administer and set security for different entities of the same portlet?

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Mansour,

> Let's say I need 2 instances of the same portlets (ie. IFrame). Only One 
> of them is to be visible by guest user. Both are visible by logged in users.
You can add two portlet entities in a page by adding two portlet fragments in the psml page.
You can use portlet-selector page or edit the psml file manually.
Also, you can set VIEW constraint on each portlet fragment. 
(See http://portals.apache.org/jetspeed-2/guides/guide-psml.html#Portlet_Fragments for the
detail.)

> Q1- I am not be able to add the same portlet twice on the same page.
I cannot catch what you mean. You can add portlet entities with the same portlet as mentioned
above.

> Q2- how do I go around managing the security and permission to get this 
> scenario ?
See http://portals.apache.org/jetspeed-2/guides/guide-psml.html#Portlet_Fragments for the detail.

HTH,

-Woonsan.

--- Mansour <ma...@yahoo.com> wrote:

> Ok, Maybe I should have put it in a different way. My fault.
> Let's say I need 2 instances of the same portlets (ie. IFrame). Only One 
> of them is to be visible by guest user. Both are visible by logged in users.
> Q1- I am not be able to add the same portlet twice on the same page.
> Q2- how do I go around managing the security and permission to get this 
> scenario ?
> 
> 
> 
> 
> 
> Mansour wrote:
> > Hi Woonsan,
> > My question was how to manage and set the security permissions. 
> > whether it's reasonable or not, this is not the question I need. All I 
> > want is to understand how j2-admin works, and the step I need to give 
> > the guest permissions.
> > I am new to JS2 and trying to figure out how to administer and use it, 
> > in other words this setup is not used in real live system. :)
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: How to administer and set security for different entities of the same portlet?

Posted by Mansour <ma...@yahoo.com>.
Ok, Maybe I should have put it in a different way. My fault.
Let's say I need 2 instances of the same portlets (ie. IFrame). Only One 
of them is to be visible by guest user. Both are visible by logged in users.
Q1- I am not be able to add the same portlet twice on the same page.
Q2- how do I go around managing the security and permission to get this 
scenario ?





Mansour wrote:
> Hi Woonsan,
> My question was how to manage and set the security permissions. 
> whether it's reasonable or not, this is not the question I need. All I 
> want is to understand how j2-admin works, and the step I need to give 
> the guest permissions.
> I am new to JS2 and trying to figure out how to administer and use it, 
> in other words this setup is not used in real live system. :)
>


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


Re: How to administer and set security for different entities of the same portlet?

Posted by Mansour <ma...@yahoo.com>.
Hi Woonsan,
My question was how to manage and set the security permissions. whether 
it's reasonable or not, this is not the question I need. All I want is 
to understand how j2-admin works, and the step I need to give the guest 
permissions.
I am new to JS2 and trying to figure out how to administer and use it, 
in other words this setup is not used in real live system. :)



Woonsan Ko wrote:
> Hi Mansour,
>
> Is it reasonable for the guest user to set a URL preference?
> If the user does not log in, the portal cannot store preferences for the guest user, AFAIK.
> Or, if it is allowed, then the preferences can be shared among guest users.
> Therefore, IMHO, you need to implement a new portlet storing/reading URL settings somewhere such
> as cookies.
>
> -Woonsan
>
> --- Mansour <ma...@yahoo.com> wrote:
>
>   
>> Is there an available answer for this question? Setting the security 
>> using j2-admin is unclear at all and I couldn't find any docs about it. 
>> Any one can point me in the right direction ?
>>
>>
>> Mansour wrote:
>>     
>>> I need two IFrames on the main page. One of them is editable by the 
>>> user and the other one is not.
>>> I need the guest user to be able to specify the URL for only one of 
>>> these IFramesPortlet. How can I get this to work ?
>>> I can not find any docs or guides about using (not developing) for 
>>> jetspeed. Is there any documents like this ?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>>     
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>   


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


Re: How to administer and set security for different entities of the same portlet?

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Mansour,

Is it reasonable for the guest user to set a URL preference?
If the user does not log in, the portal cannot store preferences for the guest user, AFAIK.
Or, if it is allowed, then the preferences can be shared among guest users.
Therefore, IMHO, you need to implement a new portlet storing/reading URL settings somewhere such
as cookies.

-Woonsan

--- Mansour <ma...@yahoo.com> wrote:

> Is there an available answer for this question? Setting the security 
> using j2-admin is unclear at all and I couldn't find any docs about it. 
> Any one can point me in the right direction ?
> 
> 
> Mansour wrote:
> > I need two IFrames on the main page. One of them is editable by the 
> > user and the other one is not.
> > I need the guest user to be able to specify the URL for only one of 
> > these IFramesPortlet. How can I get this to work ?
> > I can not find any docs or guides about using (not developing) for 
> > jetspeed. Is there any documents like this ?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: How to administer and set security for different entities of the same portlet?

Posted by Mansour <ma...@yahoo.com>.
Is there an available answer for this question? Setting the security 
using j2-admin is unclear at all and I couldn't find any docs about it. 
Any one can point me in the right direction ?


Mansour wrote:
> I need two IFrames on the main page. One of them is editable by the 
> user and the other one is not.
> I need the guest user to be able to specify the URL for only one of 
> these IFramesPortlet. How can I get this to work ?
> I can not find any docs or guides about using (not developing) for 
> jetspeed. Is there any documents like this ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


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