Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG JSONDataFormatter should respect canView() permissions

  • Loading branch information...
commit aff28eb896076069d429381e6ab0f453550f7579 1 parent 7a7c1a6
@halkyon halkyon authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 api/JSONDataFormatter.php
View
5 api/JSONDataFormatter.php
@@ -135,7 +135,10 @@ public function convertDataObjectToJSONObject(DataObjectInterface $obj, $fields
*/
public function convertDataObjectSet(SS_List $set, $fields = null) {
$items = array();
- foreach ($set as $do) $items[] = $this->convertDataObjectToJSONObject($do, $fields);
+ foreach($set as $do) {
+ if(!$do->canView()) continue;
+ $items[] = $this->convertDataObjectToJSONObject($do, $fields);
+ }
$serobj = ArrayData::array_to_object(array(
"totalSize" => (is_numeric($this->totalSize)) ? $this->totalSize : null,
Please sign in to comment.
Something went wrong with that request. Please try again.