You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Ate Douma (JIRA)" <je...@portals.apache.org> on 2010/04/07 15:17:33 UTC

[jira] Issue Comment Edited: (JS2-1153) Problem with GroupManager

    [ https://issues.apache.org/jira/browse/JS2-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854477#action_12854477 ] 

Ate Douma edited comment on JS2-1153 at 4/7/10 1:16 PM:
--------------------------------------------------------

Hi Francisco, 

I just looked at the getGroupsAssociatedTo method in GroupManagerImpl and it indeed is implemented wrong.
Your comments are spot on and the suggested fix is appropriate.
I will commit this shortly, as well as fixing the exact same bug in RoleManagerImpl.
Thanks for catching this and reporting the issue!

      was (Author: adouma):
    Hi Francisco, 

I just looked at the mentioned methods in GroupManagerImpl and those indeed are wrong.
Your comments are spot on and indeed your suggested fix is appropriate.
I will commit these shortly, as well as fixing the exact same bug in RoleManagerImpl.
Thanks for catching this and reporting the issue!
  
> Problem with GroupManager
> -------------------------
>
>                 Key: JS2-1153
>                 URL: https://issues.apache.org/jira/browse/JS2-1153
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Components Core
>    Affects Versions: 2.2.0
>            Reporter: Francisco Javier Rosado
>            Assignee: Ate Douma
>             Fix For: 2.2.1
>
>
> When I make an association between two groups, the methods getGroupsAssociatedTo and getGroupsAssociatedFrom returns the same result. for example:
> this.groupManager.addGroupToGroup(AA, BB, JetspeedPrincipalAssociationType.IS_PART_OF);
> This returns two records:
> List <Group> lista = this.groupManager.getGroupsAssociatedTo(AA, JetspeedPrincipalAssociationType.IS_PART_OF );
> List <Group> lista = this.groupManager.getGroupsAssociatedFrom(AA, JetspeedPrincipalAssociationType.IS_PART_OF );
> This returno no records:
> List <Group> lista = this.groupManager.getGroupsAssociatedTo(BB, JetspeedPrincipalAssociationType.IS_PART_OF );
> List <Group> lista = this.groupManager.getGroupsAssociatedFrom(BB, JetspeedPrincipalAssociationType.IS_PART_OF );
> I think the problem is in class [GroupManagerImpl], who extends [BaseJetspeedPrincipalManager]. GroupManagerImpl has "getGroupsAssociatedFrom" and "getGroupsAssociatedTo" methods, but both call the same method of [BaseJetspeedPrincipalManager]:
> /* (non-Javadoc)
>      * @see org.apache.jetspeed.security.GroupManager#getGroupsAssociatedFrom(org.apache.jetspeed.security.Group, java.lang.String)
>      */
>     @SuppressWarnings("unchecked")
>     public List<Group> getGroupsAssociatedFrom(Group from, String associationName)
>     {
>         return (List<Group>)getAssociatedFrom(from.getName(), from.getType(), associationName);
>     }
>     
>     /* (non-Javadoc)
>      * @see org.apache.jetspeed.security.GroupManager#getGroupsAssociatedTo(org.apache.jetspeed.security.Group, java.lang.String)
>      */
>     @SuppressWarnings("unchecked")
>     public List<Group> getGroupsAssociatedTo(Group to, String associationName)
>     {
>         return (List<Group>)getAssociatedFrom(to.getName(), to.getType(), associationName);
>     }
> when "getGroupsAssociatedTo" method must call "BaseJetspeedPrincipalManager.getAssociatedTo", nor "BaseJetspeedPrincipalManager.getAssociatedFrom".
> Regards
> Francisco Rosado

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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