Skip to content

Commit 89811e1

Browse files
authored
Merge pull request #231 from permitio/omer/per-11326-make-factdb-role-assignments-backward-compatible
backward compatible local role assignment
2 parents 6f68e53 + eb0f7f7 commit 89811e1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

horizon/local/schemas.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@ def tenant(self) -> str:
9797
return self.attributes.get("tenant", "")
9898

9999
@property
100-
def resource_instance(self) -> str:
101-
return self.attributes.get("resource", "")
100+
def resource_instance(self) -> str | None:
101+
resource = self.attributes.get("resource", "")
102+
if not resource or resource.startswith("__tenant:"):
103+
return None
104+
return resource
102105

103106
def into_role_assignment(self) -> RoleAssignment:
104107
return RoleAssignment(

0 commit comments

Comments
 (0)