Loosen some unique name constraints. Note I've reset the migrations since we're in the dev cycle and I can still do that.

This commit is contained in:
Michael DeHaan
2013-03-26 14:51:14 -04:00
parent 5e91e0a43c
commit 2d3ff081c1
11 changed files with 359 additions and 2786 deletions

View File

@@ -378,9 +378,7 @@ class Host(CommonModelNameNotUnique):
@classmethod
def can_user_add(cls, user, data):
print "DEBUG: can_user_add called for HOST: %s" % data
if not 'inventory' in data:
print 'DEBUG: missing inventory!'
return False
inventory = Inventory.objects.get(pk=data['inventory'])
return Inventory._has_permission_types(user, inventory, PERMISSION_TYPES_ALLOWING_INVENTORY_WRITE)
@@ -499,7 +497,7 @@ class Project(CommonModel):
return False
class Permission(CommonModel):
class Permission(CommonModelNameNotUnique):
'''
A permission allows a user, project, or team to be able to use an inventory source.
'''