grouper-users - [grouper-users] RE: Sending a warning using a hook ?
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Gagné Sébastien <>, "" <>
- Subject: [grouper-users] RE: Sending a warning using a hook ?
- Date: Thu, 17 Jan 2013 18:46:14 +0000
- Accept-language: en-US
I don’t think you can complete it in the hook while throwing a veto… it is one DB transaction which will rollback
J I guess you could try committing and vetoing, but I think that might be too adventurous… I wouldn’t try it. Yes, in memory you would need sticky load balancing. If not, then you need to store in DB or something… Thanks, Chris From: Gagné Sébastien [mailto:]
Ok, good to know. Yes your idea might work, I’ll have to keep it in mind if we really need that function. One downside might be user re-trying their invalid modification thinking the second time will work as does
the “warning only” operations. One other problem is that we use two application servers, so in theory they might do the two operations on separate servers (in practice we have sticky load balancing, but we never know what could happen). My idea might be to throw a Veto, but manually complete the operation in the Hook. The operation in the UI would say that it failed, but users would see their desired value. The problem might be
the confusion this might create and to find a way to avoid looping in the hook (maybe I could use a cache like you said or do it with a database update) Thanks De : Chris Hyzer []
We didn’t really consider that case. I wonder if you could send a veto with a message to the screen, but keep track that you just vetoed it (in an expirable in memory cache with a MultiKey with the userid, groupname, value, etc), and if you get
that same request again in a certain period of time, then you know the user had been warned and not veto it… If you just want the hook to throw a message on the screen and let it complete the first time, I think you would have to edit the UI code for that… Thanks, Chris From:
[]
On Behalf Of Gagné Sébastien Hi, I previously used a group hook to block the group creation by throwing a HookVeto. Right now I’m wondering if it’s possible to send a warning to the user using the Hook but still have the process complete. My use case would be : Using a AttributeAssignValueHooks, prevent invalid values (<= 0) and show a warning if the user uses a low value (0 < val < 5) that could possibly have bad consequences, but still let the value be set since it might be
the right value for them. Thanks Sébastien Gagné, |
Analyste en informatique 514-343-6111 x33844
|
Université de Montréal,
|
Pavillon Roger-Gaudry, local X-100-11 |
- [grouper-users] Sending a warning using a hook ?, Gagné Sébastien, 01/16/2013
- [grouper-users] RE: Sending a warning using a hook ?, Chris Hyzer, 01/17/2013
- [grouper-users] RE: Sending a warning using a hook ?, Gagné Sébastien, 01/17/2013
- [grouper-users] RE: Sending a warning using a hook ?, Chris Hyzer, 01/17/2013
- [grouper-users] RE: Sending a warning using a hook ?, Gagné Sébastien, 01/17/2013
- [grouper-users] RE: Sending a warning using a hook ?, Chris Hyzer, 01/17/2013
Archive powered by MHonArc 2.6.16.