Skip to Content.
Sympa Menu

grouper-users - RE: Re: [grouper-users] RE: Unix GID's in Grouper

Subject: Grouper Users - Open Discussion List

List archive

RE: Re: [grouper-users] RE: Unix GID's in Grouper


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "" <>, "" <>
  • Subject: RE: Re: [grouper-users] RE: Unix GID's in Grouper
  • Date: Fri, 28 May 2010 12:07:19 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

I think this document should answer all your questions:

https://spaces.internet2.edu/display/GrouperWG/Getting+started+with+hooks

> What I don't understand is where I have to register the UnixGroupHook.java
> in my grouper.properties

Anywhere, preferably where the hooks examples are commented out, just do
something like this:

hooks.group.class=some.package.UnixGroupHook

Note if you have multiple, they must be comma separated on the same line, you
cant define multiple properties in a properties file with the same name or
they will overwrite

> and where and how I should call the setUnixGroupId function.

In the example you see: group.setAttribute("gid", "2");

Instead of that, you want to run your query, something like this:

String sequenceNumber =
edu.internet2.middleware.grouper.hibernate.HibernateSession.bySqlStatic().select(String.class,
"select some_col from some_table");
group.setAttribute("gid", sequenceNumber);

> Where do I have to define the groupPostInsert? I couldn't find anything in
> the documentation about this.

That method is in the UnixGroupHook


Feel free to write back to the list, we will get this working (though I will
be out for a few days).

Chris


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


[mailto:]

Sent: Friday, May 28, 2010 6:32 AM
To:

Subject: Re: Re: [grouper-users] RE: Unix GID's in Grouper

Hi,

I don't want to misuse the documentation feedback thread with this, so I'm
using this old thread:

Mirko Tasler wrote:
> Here's a solution. It is for Grouper 1.4, but should work with 1.5 too:
> http://tasler.net/pebble/default/files/UnixGroupHook.java

> To use this class, create table, sequence, group type as stated in the
> comments, > then call public static void setUnixGroupId(Group group) from
> your Hook in groupPostInsert and groupPostUpdate.

I created a database table with an auto-increment gid field and a new
groupType for unix groups. What I don't understand is where I have to
register the UnixGroupHook.java in my grouper.properties and where and how I
should call the setUnixGroupId function. Where do I have to define the
groupPostInsert? I couldn't find anything in the documentation about this.

Regards,
Dirk



Archive powered by MHonArc 2.6.16.

Top of Page