Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
e562b763
Commit
e562b763
authored
Dec 21, 2012
by
Dries
Browse files
Issue
#1866908
by klausi, moshe weitzman: Honor access controlled Fields in REST Services.
parent
d63188d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/rest/lib/Drupal/rest/Plugin/rest/resource/EntityResource.php
View file @
e562b763
...
...
@@ -191,4 +191,18 @@ public function delete($id) {
}
throw
new
NotFoundHttpException
(
t
(
'Entity with ID @id not found'
,
array
(
'@id'
=>
$id
)));
}
/**
* Overrides ResourceBase::permissions().
*/
public
function
permissions
()
{
$permissions
=
parent
::
permissions
();
// Mark all items as administrative permissions for now.
// @todo Remove this restriction once proper entity access control is
// implemented. See http://drupal.org/node/1866908
foreach
(
$permissions
as
$name
=>
$permission
)
{
$permissions
[
$name
][
'restrict access'
]
=
TRUE
;
}
return
$permissions
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment