JMSSecurityExtraBundle
JMSSecurityExtraBundle copied to clipboard
SecureParam by relation
Hi. Is it possible to secure an object by his related entity? Like:
/**
* @SecureParam(name="comment.post", permissions="EDIT, DELETE")
*/
public function editPostByCommentMethod(Comment $comment)
{
// Checks $comment->getPost() on {EDIT, DELETE} perms
}
Ok, find it. Great bundle, bad docs :)
/**
* @SecureParam(name="#comment.getPost()", permissions="EDIT, DELETE")
*/
public function editPostByCommentMethod(Comment $comment)
{
}