Skip to content

Commit

Permalink
wip: Fix nested resource check for publicly shared space root
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Apr 15, 2024
1 parent ea8ee61 commit 214d2f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/grpc/interceptors/auth/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ func checkIfNestedResource(ctx context.Context, ref *provider.Reference, parent
return false, statuspkg.NewErrorFromCode(statResponse.Status.Code, "auth interceptor")
}
parentPath := statResponse.Info.Path
if utils.IsSpaceRoot(statResponse.Info) && parentPath == "." {
parentPath = "/"
}

childPath := ref.GetPath()
if childPath != "" && childPath != "." && strings.HasPrefix(childPath, parentPath) {
Expand Down

0 comments on commit 214d2f2

Please sign in to comment.