grouper-users - RE: [grouper-users] Question about GroupAttributeFilter
Subject: Grouper Users - Open Discussion List
List archive
- From: Stefano Angioni <>
- To: "Hyzer, Chris" <>, "" <>
- Subject: RE: [grouper-users] Question about GroupAttributeFilter
- Date: Thu, 15 Nov 2018 11:54:49 +0000
- Accept-language: en-US
- Authentication-results: spf=none (sender IP is ) ;
- Ironport-phdr: 9a23:5BA7NRMiQ8uW8zZT/wEl6mtUPXoX/o7sNwtQ0KIMzox0I/n9rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhSkHKTA37X3XhMJzgqJVoh2hpgBwzYHbb4yOKPpxZb/Rcc8GSWZdXMtcUTFKDIOmb4sICuoMJftWr5XjqFsAtxS+Aw6sD/7zxz9OiX/23Ko60+IgEQrb2wEgBNYOv27KoNj7L6odSvq6zLXIzTnZdfxZxS3x6JXLch04p/yHQLF+cdLJxEUxDQzJkkicpIn4Mz+Iy+gAtmab4uV8We6zjmMnpR9+riWvy8opj4TEhJ4Zx1Tc+Slkzos4Jse0RUB4bNK+EJZdtjuWO5VrTs4mW21otjg1x74atZO+eSUHyYgryAXcZvGCfYWH/hzjWeWULDhimX1ofLGyihOs/UWjzuDwSs+520tQoCVfiNnDrHUN2gTT6seZTvt9+V+s1zeS2g7P9u1IPFk4m6zCJZI/27IwkYEcvlrZEi/xhUX2kLSZdkI5+uiu9uvreK3mpoWbN49olA7xLrgums24AeQ+KAQOWHWb+fi41L3k+k35Q69GgeExkqncqJzaJMIbqbClAwJNzIos8QqzAyqj3dgFgHULMVdIeByIgoT1J13DJf74Aumij1mslTpmwvLLMqHlD5nVK3jMirbhfbJz605GzwozyMhS54lQCr4bPv7+VFT8u8fCAR8lMwy42fzoB8ln2oMDWmKDGrWZP7/KsV+U+uIvJPGBZIAPuDb6Nvgl/+DhjWUglV8AZqmmw4EXaGujE/RiIkWZembsgswfHWsQvwo+SvDqh0OYUT5VeXmyQ7ww6islB427EIeQDryq1fahzTW2BNkeTWBcC0vGWSPtfIWVSfoWQCOJKYl8ijECU/6sR5J3kVnkuxX91qJqNK/J4SACrrri0sR4/eveiUt0+DBpRYzJ3HuKUnl5hCYVXDIsx4h+p1Bw0FGOzfI+jvBFQ499/fRMBzwmOJDVyesyItb9WwXHf5/dU1KvGI6OCzgtTpQ4yJkTYBAuSJ2Zkhnf0n/yUPcunLuRCclsqPiO1mXtJ8t713fN3bUgiF9jWMZUKGm6nfMupRPLCdvPlEOU3+axeKIQ0TSF1V/LzHHG/SQ6GBV1Tb2DWHkeYkXMqtGs/UfLFeSGA707Mk1IwoifKfgCZw==
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
>
> Are you saying your code used to work and no longer does?
> Did you have your attributes as the old (legacy) types of attribute,
> and now they are not?
Yes, we have been upgrading from Grouper 1.2.1 to 2.3.0 (plus patches) and
converting our code as necessary. We have defined our attributes using the
new mechanism.
> In any case, if these aren’t legacy attributes, then you should use
> something like this code:
>
> GrouperSession gs = <get session>
> Set<Group> groups = new GroupFinder().assignNameOfAttributeDefName
> ("bath:provisionClass").assignAttributeValue("groupmanager-groups")
> .findGroups();
Thank you - this works perfectly.
It might be nice if the JavaDocs were updated to indicate that
GroupAttributeFilter only works for legacy attributes, and point developers
at GroupFinder instead.
-----Original Message-----
From: Hyzer, Chris
<>
Sent: 12 November 2018 15:07
To: Stefano Angioni
<>;
Subject: RE: [grouper-users] Question about GroupAttributeFilter
Are you saying your code used to work and no longer does? Did you have your
attributes as the old (legacy) types of attribute, and now they are not? In
any case, if these aren’t legacy attributes, then you should use something
like this code:
GrouperSession gs = <get session>
Set<Group> groups = new
GroupFinder().assignNameOfAttributeDefName("bath:provisionClass").assignAttributeValue("groupmanager-groups")
.assignPrivileges(AccessPrivilege.ATTRIBUTE_READ_PRIVILEGES).findGroups();
Note, if you are an admin user, you don’t need the READ privs part... if
this doesn’t work, let me know what you need as far as privs and I can make
an example and verify it before sending it 😊
Thanks
Chris
-----Original Message-----
From:
<>
On Behalf Of
Sent: Friday, November 09, 2018 6:11 AM
To:
Subject: [grouper-users] Question about GroupAttributeFilter
We are attempting to use GroupAttributeFilter to find groups having a
particular attribute value. The code looks like this:
GrouperSession gs = <get session>
GroupAttributeFilter gaf = new GroupAttributeFilter(
"bath:provisionClass", "groupmanager-groups",
StemFinder.findRootStem(gs));
Set<Group> ggroups = gaf.getResults(gs);
No results are returned. This appears to be because in
Hib3GropDAO.findAllByApproximateAttrHelper the following code...
String attributePrefix = legacyAttributeStemName + ":" +
legacyAttributePrefix; if (attr.startsWith(attributePrefix)) {
byHql.setString("attributeName", attr); } else {
byHql.setString("attributeName", attributePrefix + attr); }
...is actually setting the name of the attribute being examined
to:
etc:legacy:attribute:legacyAttribute_bath:provisionClass
Are we missing something, or is there a bug here?
We are using version 2.3.0 of the grouper Maven artifact, but this code seems
unchanged in the latest updates to GitHub.
Thanks.
- [grouper-users] Question about GroupAttributeFilter, s.l.angioni, 11/09/2018
- RE: [grouper-users] Question about GroupAttributeFilter, Hyzer, Chris, 11/12/2018
- RE: [grouper-users] Question about GroupAttributeFilter, Stefano Angioni, 11/15/2018
- RE: [grouper-users] Question about GroupAttributeFilter, Hyzer, Chris, 11/12/2018
Archive powered by MHonArc 2.6.19.