mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 09:38:10 -03:30
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:
@@ -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.
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user