Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Question about GroupAttributeFilter

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Question about GroupAttributeFilter


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: "" <>, "" <>
  • Subject: RE: [grouper-users] Question about GroupAttributeFilter
  • Date: Mon, 12 Nov 2018 15:07:24 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:JI7/ZBfzXyqkdwJeFqGLPAQylGMj4u6mDksu8pMizoh2WeGdxcWzZR7h7PlgxGXEQZ/co6odzbaO7Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahY75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H/ZhNFsjKxVoxyhqR5ww4/Ib4+aO/VzZb/dcsgGSWZdQspdSy5MD4WhZIUPFeoBOuNYopHzq1UMrRq/BBejBPn3xjRVmHL23bc60+U6EQ3IwQctGNcOv2jUrNT1NaYdT/q1wbLJzTXYc/xawyr96JDWfRAnp/GAR6x/ftfMyUQ2EQ7Ok1aeqZT9Mj+LzOsBr3WX4u99We6ylmIqrg9xrzezysswj4TEhJwax1/a+Sh8xYs5O8G0RU9jbdK5HpZcqzuWOo9rTs84XW1kpSI3xqcbtZO5fSUG0JonyADcZvCbdoWF5xDuWeKLLjhmgX9ldqywiAuy/EWl1OHzTc253VdPoyVekNTBsm0B2hrO4cadUPR95F2u2TOX2gDT9O5EJUc0mLLDJZM9xbA8iocfvV3eEyD0hkn6laiWeV469eSy7OTnf6nmqYSbN49pjAHxL74imtSlAeQ/LggBQXSU+fi91L3k+031WrJKjuAqkqndt5DaIscbqrSlDA9S14Yv8xe/DzG439QEhXQLMkhKdA6ag4XsJl3CPe30APKxg1mjjDtn2/XLM7//DZjCMHTOlbLscahh50Nd0AYzyMpQ55NQCrEPOvLzXUrxucTdDhAlMwy1w+fmB8tn1o4FWGKPGbOWPLnPsV+Q+O0vJe+MaJULtzngNvgp/+TugmMhmV8BYamp2oMaaH+iHvRhPkWZeWTjgs0YHWcXpQoxUvbqiEaZXD5XZnayRL485iolBI68DIfDQJytj6Kb3Ce9AJJWen5KBkqSHnj1aoXXE8sLPWiJZMsnmzoLVL+nSqcr3A2u8gbxjadkZKKA4Wsc85vl29ly4ez7nxgu9Xp9BIKA0DfJByt7hGQVXzIsmb1krFZm4laFzaVihfFET5pe6+4DGlM1L5nB1+FgTs3pVxjaVtaPVFu8RNi6W3c8Qs9nkPEUZEMoUfWznB3Zm2KBA6UUjPbDUJk/8rPO0mLZJt12jWve2a8nyVQqX50cZiWdmqdj+l2LVMbymEKDmvPyL/5O1TPR9GqF0WuFtV1ZVwg1S6jeQHQDfRWK/8/h6BbESLmjQfQ8Pw1NxNTKC5MCa8ahzDAkDOzmJMyYZmuwn2mqAhPdw7iMfZjnYU0cxy6bFVAJlQZV8HqbZkAz
  • 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? 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.



Archive powered by MHonArc 2.6.19.

Top of Page