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: Julien Gribonvald <>
  • To: Chris Hyzer <>
  • Cc: "GW Brown, Information Systems and Computing" <>, "" <>
  • Subject: Re: [grouper-dev] gsh scripting operations - questions about API
  • Date: Tue, 14 Sep 2010 18:02:31 +0200

Thank you Chris,

What i'm doing is not something that we will do each days, so there is no real need, the only things is that it's slow when we have to check all groups that we have, and for the moment we have only a small part of our perimeter (only 9000 groups), and I think we will up to 50000 groups.

Thanks,
Julien


Le 14/09/2010 16:41, Chris Hyzer a écrit :
There is no method in the AccessAdapter, so there is no way to efficiently do
this in one query. So if the strategy with two methods you are doing
performs well enough (N+1 at least queries), then go for it. Otherwise we
could add a method to AccessAdapter (though you would need an upgrade)...

Thanks,
Chris

-----Original Message-----
From:


[mailto:]
On Behalf Of Julien Gribonvald
Sent: Tuesday, September 14, 2010 5:55 AM
To: GW Brown, Information Systems and Computing
Cc:

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

Thank you Gary,

Finaly I use the two method, the first to get users with privilegies and
yourth to know if the user has immediates rigths, but maybe you have a
better way to get users with privilegies on a group ?

Thanks
Julien


Le 14/09/2010 11:15, GW Brown, Information Systems and Computing a écrit :
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