[prev in list] [next in list] [prev in thread] [next in thread]
List: forgerock-openidm
Subject: Re: [OpenIDM] [EXTERNAL] queryFilter able to query a string array for a string
From: "Devenport, Jimmy George" <jgdeven () sandia ! gov>
Date: 2016-06-22 16:12:18
Message-ID: C5FD703D-7943-477E-9FC4-1E184852F805 () sandia ! gov
[Download RAW message or body]
[Attachment #2 (text/plain)]
Yes,
Example:
Curl –u openidm-admin:openidm-admin \
http://localhost/openidm/managed/esnUser?_queryFilter=emailAddress/0+eq+'jgdeven'<http://localhost/openidm/managed/esnUser?_queryFilter=emailAddress/0+eq+'jgdeven'>
BUT, you'd have to go through and find out how many elements are in that array for \
each object… so in the case above, it only searches the first element… what if \
jgdeven is in the second or fifth element or twenty-fifth element of the array?
See this – the fix is to use an actual query instead:
https://bugster.forgerock.org/jira/browse/OPENIDM-3155
Also see repo.jdbc.json – I was originally using query-group-membership but don't \
need that query any more. There is also query-groups-owned in there that you are \
using in scripts/esn/trusted/groups/isAuthorizedToChangeGroupOwnerJDS.js – but now \
with the relationships you can just look at the managed/esnUser/<id>/groupsOwned \
field…
That reminds me I need to check that code in… probably this afternoon after or \
during our meeting.
Jimmy
From: <openidm-bounces@forgerock.org> on behalf of Damon Gerhardt \
<dgerhar@sandia.gov>
Reply-To: "openidm@forgerock.org" <openidm@forgerock.org>
Date: Tuesday, June 21, 2016 at 6:06 PM
To: "openidm@forgerock.org" <openidm@forgerock.org>
Subject: [EXTERNAL] [OpenIDM] queryFilter able to query a string array for a string
Can the queryFilter be used to query a string array for a string value?
Thanks,
Damon Gerhardt
Sandia National Laboratories
[Attachment #3 (text/html)]
<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri">Yes,<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri">Example:<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Curl –u \
openidm-admin:openidm-admin <a \
href="http://localhost/openidm/managed/esnUser?_queryFilter=emailAddress/0+eq+'jgdeven'">
http://localhost/openidm/managed/esnUser?_queryFilter=emailAddress/0+eq+'jgdeven'</a><o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">BUT, you'd have \
to go through and find out how many elements are in that array for each object… so \
in the case above, it only searches the first element… what if jgdeven is in the \
second or fifth element or twenty-fifth element of the array?<o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">See this – the \
fix is to use an actual query instead:<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><a \
href="https://bugster.forgerock.org/jira/browse/OPENIDM-3155">https://bugster.forgerock.org/jira/browse/OPENIDM-3155</a><o:p></o:p></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Also see \
repo.jdbc.json – I was originally using query-group-membership but don't need that \
query any more. There is also query-groups-owned in there that you are using in \
scripts/esn/trusted/groups/isAuthorizedToChangeGroupOwnerJDS.js – but now with the \
relationships you can just look at the managed/esnUser/<id>/groupsOwned \
field…<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">That reminds me \
I need to check that code in… probably this afternoon after or during our \
meeting.<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri">Jimmy<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p> <div \
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"> <p \
class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span> \
</b><span style="font-family:Calibri;color:black"><openidm-bounces@forgerock.org> \
on behalf of Damon Gerhardt <dgerhar@sandia.gov><br> <b>Reply-To: \
</b>"openidm@forgerock.org" <openidm@forgerock.org><br> <b>Date: \
</b>Tuesday, June 21, 2016 at 6:06 PM<br> <b>To: \
</b>"openidm@forgerock.org" <openidm@forgerock.org><br> <b>Subject: \
</b>[EXTERNAL] [OpenIDM] queryFilter able to query a string array for a \
string<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black">Can the queryFilter be used \
to query a string array for a string value?<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black"><o:p> </o:p></span></p> \
</div> <div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black">Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black">Damon \
Gerhardt<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black">Sandia National \
Laboratories<o:p></o:p></span></p> </div>
<p class="MsoNormal"><span \
style="font-size:10.5pt;font-family:Calibri;color:black"><o:p> </o:p></span></p> \
</div> </div>
</div>
</body>
</html>
_______________________________________________
OpenIDM mailing list
OpenIDM@forgerock.org
https://lists.forgerock.org/mailman/listinfo/openidm
--===============3978609525323668803==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic