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 "Kumar, Ravi R" <ra...@hp.com> on 2007/07/05 16:00:09 UTC

Group Enable/Disable is not working

Hi,

We are using GroupManager jetspeed services in our application to
enable/disable a group as shown below.But this functionality is not
working.Is it a issue in jetspeed 2.1 or we are doing something wrong?

   // Enabling customer
    PortletConfig  portletConfig  =
(PortletConfig)request.getAttribute("javax.portlet.config");
    groupManager = (GroupManager)
portletConfig.getPortletContext().getAttribute(CommonPortletServices.CPS
_GROUP_MANAGER_COMPONENT);       
     GroupPrincipal gp=(GroupPrincipal)
groupManager.getGroup("Communications").getPrincipal();  
     gp.setEnabled(true);
   
        
   //Disabling customer
   PortletConfig  portletConfig  =
(PortletConfig)request.getAttribute("javax.portlet.config");
   groupManager = (GroupManager)
portletConfig.getPortletContext().getAttribute(CommonPortletServices.CPS
_GROUP_MANAGER_COMPONENT);
   GroupPrincipal gp=(GroupPrincipal)
groupManager.getGroup("Communications)").getPrincipal();  
   gp.setEnabled(false); 

 

regards

ravi


               
        


Re: Group Enable/Disable is not working

Posted by Ate Douma <at...@douma.nu>.
Disabling Groups and Roles is a long time feature we want to provide (hence the preliminary api you've found), but which still isn't implemented fully yet.
Currently, this feature is slated for the next major release, 2.2.
See: https://issues.apache.org/jira/browse/JS2-27

Regards,

Ate

Kumar, Ravi R wrote:
> Hi,
> 
> I checked the group manager api.  
> 
> setGroupEnabled(String groupFullPathName, boolean enabled) 
> Enable or disable a group.
> 
> groupManager.setGroupEnabled("Communications", false);
> 
> But still iam not able to disable the group.When I retrieve the all
> groups the status is still true.
> 
> Regards
> Ravi
> 
> 
> -----Original Message-----
> From: David Sean Taylor [mailto:david@bluesunrise.com] 
> Sent: Friday, July 06, 2007 12:12 AM
> To: Jetspeed Users List
> Subject: Re: Group Enable/Disable is not working
> 
> 
> On Jul 5, 2007, at 7:00 AM, Kumar, Ravi R wrote:
> 
>> Hi,
>>
>> We are using GroupManager jetspeed services in our application to 
>> enable/disable a group as shown below.But this functionality is not 
>> working.Is it a issue in jetspeed 2.1 or we are doing something wrong?
>>
>>    // Enabling customer
>>     PortletConfig  portletConfig  =
>> (PortletConfig)request.getAttribute("javax.portlet.config");
>>     groupManager = (GroupManager)
>> portletConfig.getPortletContext().getAttribute
>> (CommonPortletServices.CPS
>> _GROUP_MANAGER_COMPONENT);
>>      GroupPrincipal gp=(GroupPrincipal) 
>> groupManager.getGroup("Communications").getPrincipal();
>>      gp.setEnabled(true);
>>
>>
>>    //Disabling customer
>>    PortletConfig  portletConfig  =
>> (PortletConfig)request.getAttribute("javax.portlet.config");
>>    groupManager = (GroupManager)
>> portletConfig.getPortletContext().getAttribute
>> (CommonPortletServices.CPS
>> _GROUP_MANAGER_COMPONENT);
>>    GroupPrincipal gp=(GroupPrincipal)
>> groupManager.getGroup("Communications)").getPrincipal();
>>    gp.setEnabled(false);
>>
> Try this API:
> 
> http://portals.apache.org/jetspeed-2/multiproject/jetspeed-api/
> apidocs/org/apache/jetspeed/security/GroupManager.html#setGroupEnabled
> (java.lang.String,%20boolean)
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 


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


RE: Group Enable/Disable is not working

Posted by "Kumar, Ravi R" <ra...@hp.com>.
Hi,

I checked the group manager api.  

setGroupEnabled(String groupFullPathName, boolean enabled) 
Enable or disable a group.

groupManager.setGroupEnabled("Communications", false);

But still iam not able to disable the group.When I retrieve the all
groups the status is still true.

Regards
Ravi


-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Friday, July 06, 2007 12:12 AM
To: Jetspeed Users List
Subject: Re: Group Enable/Disable is not working


On Jul 5, 2007, at 7:00 AM, Kumar, Ravi R wrote:

>
> Hi,
>
> We are using GroupManager jetspeed services in our application to 
> enable/disable a group as shown below.But this functionality is not 
> working.Is it a issue in jetspeed 2.1 or we are doing something wrong?
>
>    // Enabling customer
>     PortletConfig  portletConfig  =
> (PortletConfig)request.getAttribute("javax.portlet.config");
>     groupManager = (GroupManager)
> portletConfig.getPortletContext().getAttribute
> (CommonPortletServices.CPS
> _GROUP_MANAGER_COMPONENT);
>      GroupPrincipal gp=(GroupPrincipal) 
> groupManager.getGroup("Communications").getPrincipal();
>      gp.setEnabled(true);
>
>
>    //Disabling customer
>    PortletConfig  portletConfig  =
> (PortletConfig)request.getAttribute("javax.portlet.config");
>    groupManager = (GroupManager)
> portletConfig.getPortletContext().getAttribute
> (CommonPortletServices.CPS
> _GROUP_MANAGER_COMPONENT);
>    GroupPrincipal gp=(GroupPrincipal)
> groupManager.getGroup("Communications)").getPrincipal();
>    gp.setEnabled(false);
>
Try this API:

http://portals.apache.org/jetspeed-2/multiproject/jetspeed-api/
apidocs/org/apache/jetspeed/security/GroupManager.html#setGroupEnabled
(java.lang.String,%20boolean)



---------------------------------------------------------------------
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: Group Enable/Disable is not working

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Jul 5, 2007, at 7:00 AM, Kumar, Ravi R wrote:

>
> Hi,
>
> We are using GroupManager jetspeed services in our application to
> enable/disable a group as shown below.But this functionality is not
> working.Is it a issue in jetspeed 2.1 or we are doing something wrong?
>
>    // Enabling customer
>     PortletConfig  portletConfig  =
> (PortletConfig)request.getAttribute("javax.portlet.config");
>     groupManager = (GroupManager)
> portletConfig.getPortletContext().getAttribute 
> (CommonPortletServices.CPS
> _GROUP_MANAGER_COMPONENT);
>      GroupPrincipal gp=(GroupPrincipal)
> groupManager.getGroup("Communications").getPrincipal();
>      gp.setEnabled(true);
>
>
>    //Disabling customer
>    PortletConfig  portletConfig  =
> (PortletConfig)request.getAttribute("javax.portlet.config");
>    groupManager = (GroupManager)
> portletConfig.getPortletContext().getAttribute 
> (CommonPortletServices.CPS
> _GROUP_MANAGER_COMPONENT);
>    GroupPrincipal gp=(GroupPrincipal)
> groupManager.getGroup("Communications)").getPrincipal();
>    gp.setEnabled(false);
>
Try this API:

http://portals.apache.org/jetspeed-2/multiproject/jetspeed-api/ 
apidocs/org/apache/jetspeed/security/GroupManager.html#setGroupEnabled 
(java.lang.String,%20boolean)



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