Open
Description
should be done in lua on resource creation? yes, but in this case,
we need to be able to ensure that the synched policies are created
for the tenant where the new resource is created (i.e. we need to pass
the correct headers in the subscription process), otherwise
the correct headers in the subscription process), otherwise
- in case of IS_PRIVATE_ORG=FALSE - we won't know the tenant for the resource
and we will create policy in tenant 'Default' which would
be wrong ).
else:
return serialize_policy(db_policy)
# TODO: 0. if at least provider exists (beyond the node itself), we should not
# create default policies in lua
# TODO: 1. before creating a policy for a resource, subscribe to it.
# should be done in lua on resource creation? yes, but in this case,
# we need to be able to ensure that the synched policies are created
# for the tenant where the new resource is created (i.e. we need to pass
# the correct headers in the subscription process), otherwise
# - in case of IS_PRIVATE_ORG=FALSE - we won't know the tenant for the resource
# and we will create policy in tenant 'Default' which would
# be wrong ).
@router.post("/",
response_class=Response,
status_code=status.HTTP_201_CREATED,