mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API Removed permission checks from XML/JSON data formatters
Please handle those checks in the logic using the formatters instead. Applied permission checks to its primary use case, the "restfulserver" module.
This commit is contained in:
parent
08832261c1
commit
d54b1b4d86
@ -139,7 +139,7 @@ class XMLDataFormatter extends DataFormatter {
|
||||
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||
$xml .= (is_numeric($this->totalSize)) ? "<$className totalSize=\"{$this->totalSize}\">\n" : "<$className>\n";
|
||||
foreach($set as $item) {
|
||||
if($item->canView()) $xml .= $this->convertDataObjectWithoutHeader($item, $fields);
|
||||
$xml .= $this->convertDataObjectWithoutHeader($item, $fields);
|
||||
}
|
||||
$xml .= "</$className>";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user