Skip to content

Commit

Permalink
Expose model metadata from Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Nov 17, 2023
1 parent 4bd1103 commit 33d7774
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 33d7774

Please sign in to comment.