<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Alfredo,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
What is the content of <b>$data['Candidate']['Site']</b> and <b>$usersites</b> ? Can you find the string of the first one in the elements of the second one?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Meanwhile, here is the fix we are likely incorporating in our new patch <a href="https://github.com/aces/Loris/pull/7486/files" id="LPlnk">https://github.com/aces/Loris/pull/7486/files</a></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<br>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
@bientôt</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Xavier</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin:0px">
<div style="margin:0px;font-weight:normal;font-size:12px;font-family:Helvetica">
<div style="margin:0px;overflow-wrap:break-word">
<div style="margin:0px"><br>
</div>
</div>
</div>
</div>
</div>
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Morales Pinzon, Alfredo <AMORALESPINZON@BWH.HARVARD.EDU><br>
<b>Sent:</b> June 15, 2021 2:05 PM<br>
<b>To:</b> Xavier Lecours Boucher, Mr <xavier.lecoursboucher@mcgill.ca><br>
<b>Cc:</b> loris-dev@bic.mni.mcgill.ca <loris-dev@bic.mni.mcgill.ca>; Sridar Narayanan, Dr. <sridar.narayanan@mcgill.ca>; Douglas Arnold, Dr. <douglas.arnold@mcgill.ca>; Guttmann, Charles,M.D. <guttmann@bwh.harvard.edu>; Istvan Akos Imre Morocz, Dr <istvan.morocz@mcgill.ca><br>
<b>Subject:</b> Re: Error insert candidates api/v0.0.3/candidates</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Xavier,
<div class=""><br class="">
</div>
<div class="">
<div class="" style="orphans:2; widows:2">Thank you for creating the issue and suggesting a fix. As a mentioned in my previous email, the issue is still present for a user that doesn’t have a lot of centers so that the list of centers is not truncated. In this
 case I am getting the same message <span class="" style="color:rgb(162,86,55); font-family:Menlo,Monaco,"Courier New",monospace; white-space:pre; background-color:rgb(255,255,255); orphans:2; widows:2">"You are not affiliated with the candidate`s site</span><span class="" style="background-color:rgb(255,255,255); orphans:2; widows:2; white-space:pre"><font color="#a25637" face="Menlo, Monaco, Courier New, monospace" class="">”</font></span><font color="#000000" class="">.
 In my previous email I sent the results of the API for this user, is the one that starts with “array(56)”.</font></div>
<div class="" style="orphans:2; widows:2"><font color="#000000" class=""><br class="">
</font></div>
<div class="" style="orphans:2; widows:2"><font color="#000000" class="">What is you input on this case?</font></div>
<div class="" style="orphans:2; widows:2"><font color="#000000" class=""><br class="">
</font></div>
<div class="" style="orphans:2; widows:2"><font color="#000000" class="">Best,</font></div>
<div class="" style="orphans:2; widows:2"><font color="#000000" class="">Alfredo.</font></div>
<div><br class="">
<div class="">On Jun 15, 2021, at 10:48 AM, Xavier Lecours Boucher, Mr <<a href="mailto:xavier.lecoursboucher@mcgill.ca" class="">xavier.lecoursboucher@mcgill.ca</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="margin-top:0px; margin-bottom:0px; font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="padding:3px 10px; border-top-left-radius:5px; border-top-right-radius:5px; border-bottom-right-radius:5px; border-bottom-left-radius:5px; color:rgb(255,255,255); font-weight:bold; display:inline-block; background-color:rgb(255,0,0)">        External
 Email - Use Caution        </span></div>
<p class="" style="margin-top:0px; margin-bottom:0px; font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
</p>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Hi Alfredo, </span></div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Indeed, this is a bug. </span></div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">As a quick fix, you could add the following line just before the problematic statement:</span></div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
</div>
<pre class="x_hljs x_lang-sql x_s-code-block" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-indent:0px; text-transform:none; widows:auto; word-spacing:0px; text-decoration:none; margin-top:0px; padding:12px; line-height:1.30769; font-size:13px; width:auto; max-height:600px; overflow:auto; border-top-left-radius:5px; border-top-right-radius:5px; border-bottom-right-radius:5px; border-bottom-left-radius:5px; text-align:left"><code class="" style="margin:0px"><span class="x_hljs-keyword" style="margin:0px; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal">$DB->run('SET</span><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal"> SESSION group_concat_max_len </span><span class="x_hljs-operator" style="margin:0px; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal">=</span><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal"> </span><span class="x_hljs-number" style="margin:0px; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal">100000');</span></code></pre>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div id="x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</span></div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">I have created a github issue so we can find a better solution : </span><a href="https://secure-web.cisco.com/1wQOmIgqkiH7F3yTDPeQF-ONl3EmpIJMgfd50iZp4w25bCUCNXf9gqbwyBCJB3qZF-1KEFteDwpdhZLqPaX2yn_BQLYBrnQynKca06QGu_q7kOjJZV4to959daS2ZbV4Xavoj4d3OomO73Hnw37D_EfcnzgGosvSzRmRnMUZ-nFIL-8iUO_2iAk1WtrVo7ho4vGA-JeMmPt2YihoRD7SXpit95jyyOY9yJTSAL7nAAUc5wGgD_wyfRh5cfD0XJzOukG76nShQBozibDmS_cDuSg/https%3A%2F%2Fgithub.com%2Faces%2FLoris%2Fissues%2F7480" id="LPlnk" class=""><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">https://github.com/aces/Loris/issues/7480</span></a></div>
<div class="x__EReadonly_1 x__EType_OWALinkPreview x__Entity x__EId_OWALinkPreview">
</div>
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Thank you for the accurate reporting<span class="x_Apple-converted-space"> </span></span><span id="x_🙂" class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">🙂</span><span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"> </span></div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt">- Xavier <br class="">
</span><br class="">
<hr tabindex="-1" class="" style="display:inline-block; width:1150.515625px">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_Apple-converted-space"> </span>Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@BWH.HARVARD.EDU" class="">AMORALESPINZON@BWH.HARVARD.EDU</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>June 14, 2021 7:19 PM<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span>Xavier Lecours Boucher, Mr <<a href="mailto:xavier.lecoursboucher@mcgill.ca" class="">xavier.lecoursboucher@mcgill.ca</a>><br class="">
<b class="">Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:loris-dev@bic.mni.mcgill.ca" class="">loris-dev@bic.mni.mcgill.ca</a><span class="x_Apple-converted-space"> </span><<a href="mailto:loris-dev@bic.mni.mcgill.ca" class="">loris-dev@bic.mni.mcgill.ca</a>>;
 Sridar Narayanan, Dr. <<a href="mailto:sridar.narayanan@mcgill.ca" class="">sridar.narayanan@mcgill.ca</a>>; Douglas Arnold, Dr. <<a href="mailto:douglas.arnold@mcgill.ca" class="">douglas.arnold@mcgill.ca</a>>; Guttmann, Charles,M.D. <<a href="mailto:guttmann@bwh.harvard.edu" class="">guttmann@bwh.harvard.edu</a>>;
 Istvan Akos Imre Morocz, Dr <<a href="mailto:istvan.morocz@mcgill.ca" class="">istvan.morocz@mcgill.ca</a>><br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Re: Error insert candidates api/v0.0.3/candidates</font>
<div class=""> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hi Xavier,
<div class=""><br class="">
</div>
<div class="">Thank you for reaching out.</div>
<div class=""><br class="">
</div>
<div class="">There is a first bug int the following line:</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://secure-web.cisco.com/1is0gCN2r6hBd-51j4mZFeeJjBMdeq7KAF8qWNfBz_zVRYRKx0N5hT29cPQRpGT2awzDS4wUaksDBCo4nLjbN-ffNauQNwH716qcgIxE02xF4vz63_eooqwbhE2Y5aCjL17XZPB-bqwybaWidSYy5JWbgnSG9PcsUB-CqucRPZ2Tw1TJyEB12UQY6IgUNqS5H_zga_rxEGeNQUBrzOPbSumr6l4mHs3jHEIPgv6g4nTQ_29J9BZKmtKkIMwjxdHW1L7AzbnOCPZtRlKlu2LzOeA/https%3A%2F%2Fgithub.com%2Faces%2FLoris%2Fblob%2Ffc574c06f5f6c96483f22788ed446f9aa36a4783%2Fphp%2Flibraries%2FUser.class.inc%23L71" class="">https://github.com/aces/Loris/blob/fc574c06f5f6c96483f22788ed446f9aa36a4783/php/libraries/User.class.inc#L71</a></div>
<div class=""><br class="">
</div>
<div class="">If a user affiliated with multiple center such that the concatenation of the names of the center has more than 1024 characters, then the response is cut to 1024 and if the center name I want to use is not in there, then I get the same error. This
 is the case for my admin user and the more than 500 affiliation centers. We saw this with Cécile on Friday.</div>
<div class=""><br class="">
</div>
<div class="">Here is the response of the API after the changes you suggested using a user that has few center affiliations, including the one I want to add a Candidate to:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">
<div class="" style="color:rgb(54,54,54); background-color:rgb(255,255,255); font-family:Menlo,Monaco,"Courier New",monospace; line-height:18px; white-space:pre">
<div class="">array(56) {</div>
<div class="">[0]=></div>
<div class="">string(8) "inf_0102"</div>
<div class="">[1]=></div>
<div class="">string(8) "inf_0103"</div>
<div class="">...</div>
<div class="">[55]=></div>
<div class="">string(8) "inf_0313"</div>
<div class="">}</div>
<div class="">string(3) "BGI"</div>
</div>
</div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">This is the same output when using my admin user:</div>
<div class=""><br class="">
</div>
<div class="">===</div>
<div class="">
<div class="" style="color:rgb(54,54,54); background-color:rgb(255,255,255); font-family:Menlo,Monaco,"Courier New",monospace; line-height:18px; white-space:pre">
<div class="">array(114) {</div>
<div class="">[0]=></div>
<div class="">string(9) "101-KGH-1"</div>
<div class="">[1]=></div>
<div class="">string(9) "101-LHS-1"</div>
<div class="">...</div>
<div class="">[111]=></div>
<div class="">string(9) "272-CAA-1"</div>
<div class="">[112]=></div>
<div class="">string(9) "273-DDM-1"</div>
<div class="">[113]=></div>
<div class="">string(1) "2"</div>
<div class="">}</div>
<div class="">string(3) "BGI"</div>
</div>
</div>
<div class="">===</div>
<div class=""><br class="">
</div>
<div class="">Let me know what is the next step? I’m happy to debug over Zoom if that helps.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Alfredo.</div>
<div class="">
<div class=""><br class="">
<div class="">On Jun 14, 2021, at 11:04 AM, Xavier Lecours Boucher, Mr <<a href="mailto:xavier.lecoursboucher@mcgill.ca" class="">xavier.lecoursboucher@mcgill.ca</a>> wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="" style="margin-top:0px; margin-bottom:0px; font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="padding:3px 10px; border-top-left-radius:5px; border-top-right-radius:5px; border-bottom-right-radius:5px; border-bottom-left-radius:5px; color:rgb(255,255,255); font-weight:bold; display:inline-block; background-color:rgb(255,0,0)">        External
 Email - Use Caution        </span></div>
<p class="" style="margin-top:0px; margin-bottom:0px; font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
</p>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Hi Alfredo,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
There is a discrepancy between the frontend and the API way to determine which site the user have, which site to give the new candidate and if a user is allowed to create a candidate at a given site. Looking at the frontend code, I can't see any validation
 on the site other than the content of the html dropdown.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
The API checks if the user has the given site.  </div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Here is the API<span class="x_x_Apple-converted-space"> </span><a href="https://secure-web.cisco.com/1if5Eh5lps70ewShywnybjkoSptbZugNrF3KFp3Ikj31HdtP_kKvS_EXtIV8bo4sQ1XhY1mFp5CQ97Ta_5VBA3uwcObZQDvyGWwqHmVY0RTDJczBF5eOvEjZp7XGPCCyrnC4a97TlYo56eat54xNRJvdoVSn2fB149oaDE6j2hyCWmy1zrBbbWahlzbiuR4ydd0k7ZkfEvAvqWjjFfssiSvOxhGd280OG8sBE1fHVx3TqRc84NdaTQzYkM7BTv0DfNMKxpaQDEwZhM8ymX88Ctg/https%3A%2F%2Fgithub.com%2Faces%2FLoris%2Fblob%2F23.0-release%2Fmodules%2Fapi%2Fphp%2Fendpoints%2Fcandidates.class.inc%23L185" title="https://github.com/aces/Loris/blob/23.0-release/modules/api/php/endpoints/candidates.class.inc#L185" id="LPlnk555894" class="" style="margin:0px; background-color:rgb(255,255,255)">code</a>:<br class="">
<div class="">$usersites = $user->getSiteNames();
<div class="">if (!in_array($data['Candidate']['Site'], $usersites)) {</div>
<div class="">    return new \LORIS\Http\Response\JSON\Forbidden(</div>
<div class="">        'You are not affiliated with the candidate`s site'</div>
<div class="">    );</div>
</div>
<div class="">}<br class="">
</div>
<div class="">So, for debugging, can you add the following lines at <a href="https://secure-web.cisco.com/1fNyuDjwP45YKJ02APn6ItF2MKoXIN6PCZlwgpbccCqoLUyWWzBLPJbE9XvOxBwjXow-KCKAzoVz8qwXZiF1zDuQ5f6yXeKAzrO1vsrM5j3wIBR2iM29VBUkAdxLP_5M47korX_RF2RXn6XOisI2aTB6xZnehZf6R1VVjTIBiLrLcDC5Jvcauo6T97HesnSkByNr0iYbJYpIgZlaHnGZkPWOBjVGGezJr6Jh8gsh04CJgRl6JZjW5wAwoqqecRvhHRMnKhW7tmcggfWieTL112Q/https%3A%2F%2Fgithub.com%2Faces%2FLoris%2Fblob%2F23.0-release%2Fmodules%2Fapi%2Fphp%2Fendpoints%2Fcandidates.class.inc%23L184" id="LPlnk928209" class="">https://github.com/aces/Loris/blob/23.0-release/modules/api/php/endpoints/candidates.class.inc#L184</a> ,
 then tell me what it the response to your POST request ?</div>
<div class=""><br class="">
</div>
<div class="">var_dump(<span class="" style="color:rgb(102,102,102); background-color:rgb(255,255,255); display:inline!important">$user->getSiteNames(), <span class="" style="background-color:rgb(255,255,255); display:inline!important">$data['Candidate']['Site']</span></span>);</div>
<div class="">exit;</div>
<div class="">Thank you</div>
<div class="">Xavier</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://secure-web.cisco.com/1if5Eh5lps70ewShywnybjkoSptbZugNrF3KFp3Ikj31HdtP_kKvS_EXtIV8bo4sQ1XhY1mFp5CQ97Ta_5VBA3uwcObZQDvyGWwqHmVY0RTDJczBF5eOvEjZp7XGPCCyrnC4a97TlYo56eat54xNRJvdoVSn2fB149oaDE6j2hyCWmy1zrBbbWahlzbiuR4ydd0k7ZkfEvAvqWjjFfssiSvOxhGd280OG8sBE1fHVx3TqRc84NdaTQzYkM7BTv0DfNMKxpaQDEwZhM8ymX88Ctg/https%3A%2F%2Fgithub.com%2Faces%2FLoris%2Fblob%2F23.0-release%2Fmodules%2Fapi%2Fphp%2Fendpoints%2Fcandidates.class.inc%23L185" title="https://github.com/aces/Loris/blob/23.0-release/modules/api/php/endpoints/candidates.class.inc#L185" class=""></a><br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:670.7156372070312px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">From:</b><span class="x_x_Apple-converted-space"> </span><a href="mailto:loris-dev-bounces@bic.mni.mcgill.ca" class="">loris-dev-bounces@bic.mni.mcgill.ca</a><span class="x_Apple-converted-space"> </span><<a href="mailto:loris-dev-bounces@bic.mni.mcgill.ca" class="">loris-dev-bounces@bic.mni.mcgill.ca</a>>
 on behalf of Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@BWH.HARVARD.EDU" class="">AMORALESPINZON@BWH.HARVARD.EDU</a>><br class="">
<b class="">Sent:</b><span class="x_x_Apple-converted-space"> </span>June 10, 2021 6:43 PM<br class="">
<b class="">To:</b><span class="x_x_Apple-converted-space"> </span><a href="mailto:loris-dev@bic.mni.mcgill.ca" class="">loris-dev@bic.mni.mcgill.ca</a><span class="x_Apple-converted-space"> </span><<a href="mailto:loris-dev@bic.mni.mcgill.ca" class="">loris-dev@bic.mni.mcgill.ca</a>><br class="">
<b class="">Cc:</b><span class="x_x_Apple-converted-space"> </span>Rozie Arnaoutelis, Ms. <<a href="mailto:rozie.arnaoutelis@mcgill.ca" class="">rozie.arnaoutelis@mcgill.ca</a>>; Sridar Narayanan, Dr. <<a href="mailto:sridar.narayanan@mcgill.ca" class="">sridar.narayanan@mcgill.ca</a>>;
 Douglas Arnold, Dr. <<a href="mailto:douglas.arnold@mcgill.ca" class="">douglas.arnold@mcgill.ca</a>>; Guttmann, Charles, M.D. <<a href="mailto:guttmann@bwh.harvard.edu" class="">guttmann@bwh.harvard.edu</a>><br class="">
<b class="">Subject:</b><span class="x_x_Apple-converted-space"> </span>[Loris-dev] Error insert candidates api/v0.0.3/candidates</font>
<div class=""> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear LorisDev team,
<div class=""><br class="">
</div>
<div class="" style="orphans:2; widows:2">I can create Candidates using the web interface using an admin account that is linked to all the project and all the sites in the system. However when I try to create a Candidate using the api <span class="" style="color:rgb(19,19,19); font-family:Inter,OpenSans,Helvetica,Arial,sans-serif; orphans:2; white-space:pre-wrap; widows:2; background-color:rgb(255,255,255)">api/v0.0.3/candidates
</span><span class="" style="orphans:2; widows:2; background-color:rgb(255,255,255)"><font class=""><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="white-space:pre-wrap">I am getting the following error:</span></font></font></span></div>
<div class="" style="orphans:2; widows:2"><span class="" style="orphans:2; widows:2; background-color:rgb(255,255,255)"><font class=""><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="white-space:pre-wrap"><br class="">
</span></font></font></span></div>
<div class="" style="orphans:2; widows:2"><span class="" style="orphans:2; widows:2; background-color:rgb(255,255,255)"><font class=""><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="white-space:pre-wrap">===</span></font></font></span></div>
<div class="" style="orphans:2; widows:2">
<div class="" style="color:rgb(54,54,54); background-color:rgb(255,255,255); font-family:Menlo,Monaco,"Courier New",monospace; line-height:18px; white-space:pre">
<div class=""><span class="" style="color:rgb(44,44,44)">{</span></div>
<div class=""><span class="" style="color:rgb(9,89,132)">"error"</span><span class="" style="color:rgb(44,44,44)">:</span>
<span class="" style="color:rgb(162,86,55)">"You are not affiliated with the candidate`s site"</span></div>
<div class=""><span class="" style="color:rgb(44,44,44)">}</span></div>
</div>
</div>
<div class="" style="orphans:2; widows:2"><span class="" style="orphans:2; widows:2; background-color:rgb(255,255,255)"><font class=""><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="white-space:pre-wrap">===</span></font></font></span></div>
<div class="" style="orphans:2; widows:2"><span class="" style="orphans:2; widows:2; background-color:rgb(255,255,255)"><font class=""><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="white-space:pre-wrap"><br class="">
</span></font></font></span></div>
<div class="" style="orphans:2; widows:2"><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="background-color:rgb(255,255,255)"><span class="" style="white-space:pre-wrap">I’m happy to run some queries in the database
 to figure out what’s happening. Any ideas?</span></span></font></div>
<div class="" style="orphans:2; widows:2"><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="background-color:rgb(255,255,255)"><span class="" style="white-space:pre-wrap"><br class="">
</span></span></font></div>
<div class="" style="orphans:2; widows:2"><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="background-color:rgb(255,255,255)"><span class="" style="white-space:pre-wrap">Best,</span></span></font></div>
<div class="" style="orphans:2; widows:2"><font face="Inter, OpenSans, Helvetica, Arial, sans-serif" class=""><span class="" style="background-color:rgb(255,255,255)"><span class="" style="white-space:pre-wrap">Alfredo.</span></span></font></div>
<div class="">The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine
 at<span class="x_x_Apple-converted-space"> </span><a href="http://secure-web.cisco.com/1RIVOq7LsmWlGiSIpDV1iDxaKZDL4FrGgQqzQtNFdUclqgR60trLfQ1Mrv_3Jb_-Nh4SRJc_iFLFJXdP2NJMN-0HWzFBk2MS4e6vgU15rC0uEPg1nX41lWaBkOPKqdov7TstiKnJaFkbN5V7SktHpEnB3YYGFW1gB6K2lnAdqBdfpA7Aqd2s-V5UtJpeqM2FMPp-6AX661pD9MbwDsRNm-XzJR8bNHmTV73XfqLOtbx3837t9gQYbTub-VXeXIHQbr3uLsfcOkE7rA-nTlDJnnQ/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline" class="">http://www.massgeneralbrigham.org/complianceline</a><span class="x_x_Apple-converted-space"> </span>.
 If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.</div>
<br class="">
<div class="" style="margin-top:0px; margin-bottom:0px">Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send
 or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. </div>
</div>
</div>
</div>
</div>
<br class="">
</div>
</div>
</div>
<div class="">The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine
 at <a href="http://www.massgeneralbrigham.org/complianceline" class="">http://www.massgeneralbrigham.org/complianceline</a> . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of
 the e-mail.</div>
<br class="">
<div class="" style="margin-top:0px; margin-bottom:0px">Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send
 or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. </div>
</div>
</div>
</div>
</div>
<br class="">
</div>
<div>The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline
 . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.</div>
<br>
<p class="x_MsoNormal">Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving
 this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 
</p>
</div>
</div>
</body>
</html>