Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] RE: My memberships lists "empty" stems

Subject: Grouper Developers Forum

List archive

[grouper-dev] RE: My memberships lists "empty" stems


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Gagné Sébastien <>, "" <>
  • Subject: [grouper-dev] RE: My memberships lists "empty" stems
  • Date: Wed, 10 Oct 2012 03:31:28 +0000
  • Accept-language: en-US

Whoops, responded to wrong email earlier…

 

I opened this jira:

 

https://bugs.internet2.edu/jira/browse/GRP-854

 

I think this is a fix, can you try it to be sure?

 

MyMembershipsRepositoryBrowser

 

FROM (not sure why root session is used):

 

                protected Map getValidStems() throws Exception{

                                Map validStems = savedValidStems;

    if (validStems != null)

      return validStems;

    GrouperSession s = GrouperSession.startRootSession(false);

    Set groups = (Set)GrouperSession.callbackGrouperSession(s, new GrouperSessionHandler() {

 

      public Object callback(GrouperSession grouperSession)

          throws GrouperSessionException {

        Subject curSubj = getGrouperSession().getSubject();

        Member member = MemberFinder.findBySubject(grouperSession, curSubj, true);

        Set groupSet = member.getGroups();

        return groupSet;

      }

     

    });

    s.stop();

 

                                return getStems(groups);

                }

 

TO:

 

       protected Map getValidStems() throws Exception{

         Map validStems = savedValidStems;

         if (validStems != null)

           return validStems;

 

         Subject curSubj = getGrouperSession().getSubject();

         Member member = MemberFinder.findBySubject(GrouperSession.staticGrouperSession(), curSubj, true);

         Set groups = member.getGroups();

 

         return getStems(groups);

       }

 

BTW: in Grouper 2.1, it is not an easy calculation to find all root folders where there is a group nested inside somewhere where the user has certain privileges.  However, in 2.2, Shilen added in “StemSets”, which make this type of thing easy.

 

Thanks,

Chris

 

 

From: [mailto:] On Behalf Of Gagné Sébastien
Sent: Tuesday, October 09, 2012 3:39 PM
To:
Subject: [grouper-dev] My memberships lists "empty" stems

 

Hi,

Using the admin ui, if I choose “My Memberships” from the menu, it lists the stems where there are groups the user is a member of.  The problem is that it will list stems that contains groups the user isn’t authorised to see but that is a member of.

 

Example :

 

The user “dev_gagns” is an indirect member of the UI Accessing group in the “etc” stem.

Nobody excepts admins can see that group.

Going in my membership I see the “etc” stem

Clicking on “etc” gives me an empty list

 

Is it possible to include the user’s permissions in the stem filtering ?

 

 

Sébastien Gagné,     | Analyste en informatique

514-343-6111 x33844  | Université de Montréal,

                     | Pavillon Roger-Gaudry, local X-100-11

 




Archive powered by MHonArc 2.6.16.

Top of Page