Skip to content

Commit

Permalink
Merge pull request #231 from permitio/omer/per-11326-make-factdb-role…
Browse files Browse the repository at this point in the history
…-assignments-backward-compatible

backward compatible local role assignment
  • Loading branch information
omer9564 authored Jan 6, 2025
2 parents 6f68e53 + eb0f7f7 commit 89811e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions horizon/local/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ def tenant(self) -> str:
return self.attributes.get("tenant", "")

@property
def resource_instance(self) -> str:
return self.attributes.get("resource", "")
def resource_instance(self) -> str | None:
resource = self.attributes.get("resource", "")
if not resource or resource.startswith("__tenant:"):
return None
return resource

def into_role_assignment(self) -> RoleAssignment:
return RoleAssignment(
Expand Down

0 comments on commit 89811e1

Please sign in to comment.