Subject: Grouper Developers Forum
- From: "Black, Carey M." <>
- To: "Hyzer, Chris" <>
- Cc: "" <>
- Subject: RE: [grouper-dev] Hooks and the UI....
- Date: Wed, 13 Mar 2019 20:05:58 +0000
While I did not get into this detail, I was planning on the hook paying
attention to the context and only trying to "redirect" the events sent from
the UI. ( Doing such a thing from a WebService or GSH call clearly would not
make sense. )
My ref: " The hooks context (still needs to be completed), holds
information such as the current user, the current environment (UI vs WS etc),
threadlocal data (e.g. the current http request), etc. "
RE: " I think the API hooks should have little UI code in them "
Understood, and I agree in principle.
However, it feels like that is the only hammer I have right now.
Unfortunately I want something fairly quickly. (maybe a few months with v
2.3 fully patched )
So I am willing to be a bit "hacky" about it. :^( I just don't want
to overlook a "non-conflicting" or "standard" way to go about it if it exists.
Maybe the "better idea" is to just start with a "custom JSP" and "bolt it on"
to the UI.
That should insolate this work from the v2.4 upgrade and Grouper
If I really needed to I could even add a new servlet class (but that
would require WEB-INF changes that could conflict...)
Or more directly... could the "Grouper gods" maybe give me a formula
about how to make a "not guaranteed to continue to work in the future" plan:
clone this class and modify as "desired" ( compile to a jar
that you put it in WEB-INF/lib )
add a jsp/html file(s) here
( if needed ) modify WEB-INF/web.xml "something like this"
Find a way to get a link to the user(s)
I could live with a link in the header/footer to get
I can live with the following till there is a better designed model. (and
maybe this "plan" will spur that design into reality? )
Model is "remove it all modifications", patch, then put "the
modifications back" (at your own risk).
From: Hyzer, Chris <>
Sent: Wednesday, March 13, 2019 11:46 AM
To: Black, Carey M. <>; Gettes, Michael <>
Subject: RE: [grouper-dev] Hooks and the UI....
I think you could write a hook that adds attributes. Maybe we need a new
UI-hook that then could (based on something you stuff in the httprequest
object?) redirect the user to another page... I think the API hooks should
have little UI code in them, and it should be failsafe so it will still work
outside of a UI context... ok? Whats your timeframe and version of grouper?
If not 2.4 fully patched can you upgrade to that?
Note this is a little complicated since Grouper doesn’t go to screens but
rather does ajaxy things, but we can discuss the particulars and make it
On Behalf Of Black, Carey M.
Sent: Wednesday, March 13, 2019 11:18 AM
To: Gettes, Michael <>
Subject: RE: [grouper-dev] Hooks and the UI....
To be fair... I did ( for a second ) consider sending the user an email with
the link I want them to go to.
But that seemed so silly that I dismissed the idea. They are already
in the app. Why should they need to "go check their mail" to get to the right
I don't yet have any idea what work is being done for "workflows" or
"approvals" in Grouper. And I am not sure if they would be applicable for my
However, maybe a workflow that could be "kicked off" by a Membership
If it could auto assign attributes to the Membership then
that might remove my need for a custom hook all together.
I would also expect (guess) the "workflow" would be
asynchronous with the UI event. So I would not expect it would also be able
to direct the active user to a different URL as well. ( Maybe it could,
maybe it could not... all depends. )
And I might even be open to the idea of a "page that is all my own" too. ( I
still have the work of getting the user to that page, but I think I can link
users in to it. )
But again... is there a design for grouper users to "add custom
pages" to the UI?
The page would likely need to let the user:
"pick a group",
pick a subject ( at a minimum ) ,
provide a dynamic enough UI to "prompt the
user for the attribute values" before the membership is created too. (or that
would be moved to a "second custom page".
From: Gettes, Michael <>
Sent: Tuesday, March 12, 2019 11:34 PM
To: Black, Carey M. <>
Subject: Re: [grouper-dev] Hooks and the UI....
I believe work has been going on with “workflow” and “approvals”. I am
particularly interested in the approvals. Seems like what you want to do
might be similar to that sort of processing - of course, I have zero idea of
how workflow/approvals are being implemented. Maybe it will save you a lot
of time/effort? Maybe not.
> On Mar 12, 2019, at 11:24 PM, Black, Carey M. <> wrote:
> I have a desire to have a Hook "do work for the user" then "redirect them"
> to a different UI page. But I am not sure how to go about it.
> Specifically I am thinking this.
> 1) User adds a membership to a group.
> 2) Hook auto adds attributes assigned to the membership ( maybe in a
> postCommit Membership hook) [ based on attrs on the group and elsewhere...]
> 3) ( Take over the world. Er.... ) Send the user to a UI page where
> the user would be able to add values to the attributes that were just
> assigned to the membership.
> Out of scope for this question... When all values are
> supplied by a user, then a change log consumer would do some
> "provisioning/deprovisioning" work to another system.
> Normally the user lands on a URL like :
> after adding a membership to a group.
> I want them to land on this URL instead.
> Which the user could navigate to in the UI by doing all of the
> ( Starting from the "normal" outcome.)
> Click on the subject that is a member that was just added. (
> maybe after finding them in the list of memberships)
> Find the "Membership" that was just created in all of the
> users Memberships
> Click the "actions" menu button at the end of the row
> Select the "Attribute Assignments" option.
> --> Get to the URL I want them at.
> I did read though the hooks docs ( again ) and I did see something that
> might work ( maybe? ).
> RE: " Some of the built-in values for the attributes are:
> HttpServletRequest, HttpServletResponse, HttpSession (Http classes for UI
> and WS only). "
> So I have some access to the HttpServletResponse object, but.... is
> it safe to call a "sendRedirect(URL) " during a Hook? ( I am thinking
> postCommit after doing the rest of the "attribute work" for the hook.)
> Or is there a "designed way" to achieve my goals? ( Maybe a specific
> "hook attribute" that I should set instead of calling sendRedirect myself? )
> Also... IF I whisk the user away to a different URL....
> Will there be any issues with later Hooks that might still be waiting
> to be processed? ( My hope is they will still all fire "as normal". If they
> veto.....??? the Veto shows up on the redirected URL? ( or is just eaten
> because of the redirect? )
> BTW: My second idea was to "fix" the action button on the group "member" UI
> to have the "Attribute Assignments". ( Still the user would need to find
> the person they just added. Not as useful as being auto routed there, but
> that would likely be much less work for me and does not seem to be
> unreasonable. Even better if the sort order was somehow set to "newest
> members at the top" for the list. :) )
> So if you want to point me in the right direction to patch a 2.3 UI
> that way, I would be open for that too.....
> To be fair, I really want that button option anyways.... And I want
> the hook to auto send the user there too. ( Yea.. I like to have my cake
> and eat it too. )
> Thanks in advance/clue bricks. :)
> Carey Matthew
- [grouper-dev] Hooks and the UI...., Black, Carey M., 03/13/2019
- Re: [grouper-dev] Hooks and the UI...., Gettes, Michael, 03/13/2019
Archive powered by MHonArc 2.6.19.