Skip to content

Commit

Permalink
Merge pull request #17 from aserto-dev/cache-metadata
Browse files Browse the repository at this point in the history
Expose model metadata from Cache
  • Loading branch information
ronenh authored Nov 17, 2023
2 parents 4bd1103 + 33d7774 commit c7bef70
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@ func (c *Cache) PermissionExists(on model.ObjectName, pn model.PermissionName) b
}
return false
}

func (c *Cache) Metadata() *model.Metadata {
c.mtx.RLock()
defer c.mtx.RUnlock()
return c.model.Metadata
}

0 comments on commit c7bef70

Please sign in to comment.