Closed boznik closed 3 years ago
I did not get to this today due to Drupal core security advisories. I am requesting a review from @pookmish or @sherakama , or for them to delegate to any one of the other back-end devs.
Local SAML setup is not required; this code can be pushed to any dev
environment and tested via the steps that Greg has listed.
The code looks like it makes sense to me. @boznik , you are responsible for owning this to resolution. Please follow up with Mike and Shea in my absence.
Which workgroups are you using for testing?
i setup my own ~ggarvey:ggarvey so i could control the members.
I'm not seeing a difference in structure in the API response.
https://aswsweb.stanford.edu/mais/workgroupsvc/v1/workgroups/~ggarvey:ggarvey
<?xml version="1.0" encoding="UTF-8"?>
<workgroup>
<description>Personal workgroup for web development.</description>
<filter />
<visibility>STANFORD</visibility>
<reusable>TRUE</reusable>
<privgroup>TRUE</privgroup>
<members>
<member id="jbickar" url="https://workgroupsvc.stanford.edu/v1/users/jbickar" name="Bickar, John" />
<member id="ggarvey" url="https://workgroupsvc.stanford.edu/v1/users/ggarvey" name="Garvey, Greg" />
</members>
<administrators>
<member id="ggarvey" url="https://workgroupsvc.stanford.edu/v1/users/ggarvey" name="Garvey, Greg" />
</administrators>
</workgroup>
https://aswsweb.stanford.edu/mais/workgroupsvc/v1/workgroups/~sheamck:sheamck
<?xml version="1.0" encoding="UTF-8"?>
<workgroup>
<description>My test workgroup</description>
<filter />
<visibility>STANFORD</visibility>
<reusable>TRUE</reusable>
<privgroup>TRUE</privgroup>
<members>
<member id="sheamck" url="https://workgroupsvc.stanford.edu/v1/users/sheamck" name="McKinney, Shea" />
</members>
<administrators>
<member id="sheamck" url="https://workgroupsvc.stanford.edu/v1/users/sheamck" name="McKinney, Shea" />
</administrators>
</workgroup>
https://workgroupsvc-uat.stanford.edu/v1/workgroups/~jbickar:jbickar
<?xml version="1.0" encoding="UTF-8"?>
<workgroup>
<description>Includes jbickar only</description>
<filter />
<visibility>STANFORD</visibility>
<reusable>FALSE</reusable>
<privgroup>TRUE</privgroup>
<members>
<member id="jbickar" url="https://workgroupsvc-uat.stanford.edu/v1/users/jbickar" name="Bickar, John" />
</members>
<administrators>
<member id="jbickar" url="https://workgroupsvc-uat.stanford.edu/v1/users/jbickar" name="Bickar, John" />
</administrators>
</workgroup>
https://workgroupsvc.stanford.edu/v1/workgroups/~jbickar:jbickar
<?xml version="1.0" encoding="UTF-8"?>
<workgroup>
<description>Includes jbickar only</description>
<filter />
<visibility>STANFORD</visibility>
<reusable>FALSE</reusable>
<privgroup>TRUE</privgroup>
<members>
<member id="jbickar" url="https://workgroupsvc.stanford.edu/v1/users/jbickar" name="Bickar, John" />
</members>
<administrators>
<member id="jbickar" url="https://workgroupsvc.stanford.edu/v1/users/jbickar" name="Bickar, John" />
</administrators>
</workgroup>
Where are you seeing the difference in structure in the response?
Oh its not a difference in the API response, its the way the xml is parsed
That's just the way this works:
$xml = simplexml_load_string($response);
$json = json_encode($xml);
$values = json_decode($json, TRUE);
Ah so it is something in simplexml_load_string
. I wonder if there is an option to normalize that behavior.
Probably not worth the effort for the D7 stuff.
That is a ball of wax. Ok.
Thanks for splainin'
READY FOR REVIEW
Summary
Review By (Date)
Urgency
Review Tasks
Setup tasks and/or behavior to test