CORD-1726: Security Policies fail if Slice.creator is None
Change-Id: Ic72012577a737b2f06a30d420924cf7dfe3ad0eb
(cherry picked from commit 0534b471d7637416621871bc0094f9266b0c8b1d)
diff --git a/README.md b/README.md
index dc673ad..0b93d3f 100644
--- a/README.md
+++ b/README.md
@@ -21,4 +21,3 @@
version is configured with a service graph that includes
`ExampleService`, which is a good platform for understanding how to
build and use XOS.
-
diff --git a/xos/core/models/core.xproto b/xos/core/models/core.xproto
index a8cc578..f5ea149 100644
--- a/xos/core/models/core.xproto
+++ b/xos/core/models/core.xproto
@@ -142,7 +142,7 @@
policy slice_policy <
ctx.user.is_admin
| (*site_policy(site)
- & (ctx.user.id = obj.creator.id
+ & (ctx.user = obj.creator
| (exists Privilege:
Privilege.accessor_id = ctx.user.id
& Privilege.accessor_type = "User"