This allows for creation of subresources when posting new objects to a subcollection.

This commit is contained in:
Michael DeHaan
2013-03-26 18:18:05 -04:00
parent 3625039d47
commit fa54f7ad66
6 changed files with 101 additions and 19 deletions

View File

@@ -371,6 +371,10 @@ class Host(CommonModelNameNotUnique):
def __unicode__(self):
return self.name
@classmethod
def can_user_read(cls, user, obj):
return Inventory.can_user_read(user, obj.inventory)
@classmethod
def can_user_add(cls, user, data):