CORD-1726: Security Policies fail if Slice.creator is None
Change-Id: Ic72012577a737b2f06a30d420924cf7dfe3ad0eb
(cherry picked from commit 0534b471d7637416621871bc0094f9266b0c8b1d)
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"