From 95e08b888c73a46d7a36a1e856606c27e6f0bfac Mon Sep 17 00:00:00 2001
From: that0n3guy <that0n3guy@46440.no-reply.drupal.org>
Date: Fri, 12 Apr 2013 13:35:04 -0400
Subject: [PATCH] overload entity access

---
 plugins/services_entity_resource.inc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/plugins/services_entity_resource.inc b/plugins/services_entity_resource.inc
index e854d53..bea5c6d 100644
--- a/plugins/services_entity_resource.inc
+++ b/plugins/services_entity_resource.inc
@@ -15,8 +15,12 @@ class ServicesEntityResourceController implements ServicesResourceControllerInte
     }
     if ($op == 'create') {
       list($entity_type) = $args;
+      //type must be supplied or we can't check for access
+      if(!isset($args[1]['type'])){
+        services_error('Entity "type" is required', 406);
+      }
       // Pass the entity to the access control.
-      return entity_access($op, $entity_type);
+      return entity_access($op, $entity_type, $args[1]['type']);
     }
     else {
       // Retrieve, Delete, Update.
-- 
1.7.9

