grouper-users - [grouper-users] RE: grouper UI validation
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Rahul Doshi <>, "" <>
- Subject: [grouper-users] RE: grouper UI validation
- Date: Fri, 26 Jun 2015 19:58:01 +0000
- Accept-language: en-US
The attached jar (in the zip) should do the trick https://bugs.internet2.edu/jira/browse/GRP-1147 Note, I will put that in a patch at some point, or in a future release, at that time you should delete the jar. If you want to just wait for a patch that’s
fine too, let me know Thanks, Chris From: [mailto:]
On Behalf Of Rahul Doshi This looks more complex then I thought. I would very much appreciate complete hook if offer still stands. Thanks, Rahul From:
Chris Hyzer <> Theres two ways to query. Might be best for performance to find the parent stem and look for extensions in that stem String parentFolderName = GrouperUtil.parentStemNameFromName(someName);
Stem parentStem = StemFinder.findByName(grouperSession, parentFolderName,
true);
Group group = HibernateSession.byHqlStatic() .createQuery("select theGroup from Group theGroup " +
"where lower(theGroup.extensionDb) = :theExtension " +
"and theGroup.parentUuid = :stemUuid") .setString("theExtension",
StringUtils.defaultString(GrouperUtil.extensionFromName(someName)).toLowerCase()) .setString("stemUuid",
parentStem.getId()) .uniqueResult(Group.class); Otherwise you can just do a case insensitive search for that full path. If you have performance problems you might need a function based index on lower name Group group = HibernateSession.byHqlStatic() .createQuery("select theGroup from Group theGroup where
lower(theGroup.nameDb) = :theName") .setString("theName",
StringUtils.defaultString(someName).toLowerCase()).uniqueResult(Group.class); From: Rahul Doshi []
Folders are ok. I will take a look at hooks.example and will let you know if I am stuck. Thanks, Rahul From:
Chris Hyzer <> You would need a hook to veto conflicts. There are examples in the hooks.examples package or I could write one for you if you like, let me know. Do you want
it to also not allow folders with a group name too (theres an example of that in there but its not case insensitive)? Thanks, Chris From:
[]
On Behalf Of Rahul Doshi Hello, We are moving from case insensitive to case sensitive database and one thing we need to do as part of it is put a validation to avoid creating duplicate group
names. For example users should not be able to create group Apps:TEST and Apps:test. Any suggestions on best way to implement this? Thanks, Rahul |
Attachment:
grouperNameCaseInsensitiveHook.zip
Description: grouperNameCaseInsensitiveHook.zip
- [grouper-users] grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/29/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
- [grouper-users] Re: grouper UI validation, Rahul Doshi, 06/26/2015
- [grouper-users] RE: grouper UI validation, Chris Hyzer, 06/26/2015
Archive powered by MHonArc 2.6.16.