mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
docs(observability-proxy): put the route review comments on their functions
Reviews was inserted between ResourceAttributes and its doc comment, so go doc showed the ResourceAttributes text on Reviews, and that text still called it the single review a route needs, which application roots no longer are. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>
This commit is contained in:
1 parent
07f4f187ce
commit
97a55a167b
1 file changed
+3
-2
@@ -131,8 +131,6 @@ func ParseRoute(escapedPath string) (Route, *HTTPError) {
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// ResourceAttributes is the single SubjectAccessReview a route requires. It
|
||||
// depends on the path only, so a POST query authorizes exactly like a GET.
|
||||
// Reviews lists every access a request on the route needs. An application
|
||||
// root also needs read access to its namespace root: its pod and PVC
|
||||
// branches match by name across the window, so a name another application
|
||||
@@ -148,6 +146,9 @@ func (r Route) Reviews() []authorizationv1.ResourceAttributes {
|
||||
return []authorizationv1.ResourceAttributes{r.ResourceAttributes()}
|
||||
}
|
||||
|
||||
// ResourceAttributes is the SubjectAccessReview of the route's own
|
||||
// resource. It depends on the path only, so a POST query authorizes
|
||||
// exactly like a GET.
|
||||
func (r Route) ResourceAttributes() authorizationv1.ResourceAttributes {
|
||||
switch r.Kind {
|
||||
case NamespaceLogs:
|
||||
|
||||
Reference in new issue
Block a user