Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] gsh scripting operations - questions about API

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] gsh scripting operations - questions about API


Chronological Thread 
  • From: "GW Brown, Information Systems and Computing" <>
  • To: ,
  • Subject: Re: [grouper-dev] gsh scripting operations - questions about API
  • Date: Tue, 14 Sep 2010 10:15:23 +0100

Hi Julien,

I'm not sure that method really does what you want - it just calls Group.getAdmins() etc - and does not filter immediate vs indirect.

There is another method which can be applied to each subject:

public static boolean hasSubjectImmPrivForGroup(GrouperSession s,Subject subject,Group group,String privilege) throws MemberNotFoundException,SchemaException{

However, Chris may have a better way to do it. I wrote many of the GrouperHelper methods to work around things the official API did not do, however, there have been many API changes and GrouperHelper may not have kept pace.

Gary

--On 14 September 2010 11:00 +0200 Julien Gribonvald <> wrote:

Sorry, finaly I found my needs in the GrouperHelper classe with the
method getSubjectsWithPriv(Group group, String privilege)

Thanks,

Julien Gribonvald
GIP RECIA


Le 14/09/2010 10:48, Julien Gribonvald a écrit :

Hi all,

I'm looking for scripting some checking and administration operations
with GSH, I have already done some script wich are checking and updating
our tree of groups structure.
But I have a little problem with the API, found here :
http://www.internet2.edu/grouper/release/1.5.0/doc/api/index.html (we are
using grouper 1.5.2, with 1.5.3 updates), I can't find an easy way to
know, on a given group, if a subject has immediate privileges or herited
from a group. For exemple, currently, on a Group g I do like that to get
users with privilegies :

g.getReaders(); g.getViewers();g.getUpdaters();g.getAdmin();

These methods are good to obtain Subjects, but we don't know if they have
immediate privileges or not. My wisch would be to get only immediate
subjects which have a Privilege P on a Group G.

So is there someone who could give me some informations, like the good
class to watch and/or where I will find my solution ? Or any idea on how
to do that ?

Thanks for your help.

Julien Gribonvald
GIP RECIA







----------------------
GW Brown, Information Systems and Computing




Archive powered by MHonArc 2.6.16.

Top of Page