mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
Added /api/v1/groups/N/hosts and /api/v1/groups/N/all_hosts/
This commit is contained in:
@@ -123,6 +123,11 @@ class BaseSubList(BaseList):
|
||||
|
||||
# now make sure we could have already attached the two together. If we could not have, raise an exception
|
||||
# such that the transaction does not commit.
|
||||
|
||||
if main == obj:
|
||||
# no attaching to yourself
|
||||
raise PermissionDenied()
|
||||
|
||||
if self.__class__.parent_model != User:
|
||||
if not self.__class__.parent_model.can_user_attach(request.user, main, obj, self.__class__.relationship):
|
||||
raise PermissionDenied()
|
||||
|
||||
Reference in New Issue
Block a user