chaitanya-y20 commented on PR #4716:
URL: https://github.com/apache/iggy/pull/4716#issuecomment-6636172531

   Thanks @hubcio, all three are done in 388811a:
   
   - **Shared helpers**: connection handling, configuration parsing, user setup 
and the cross-tenant access check now live in `examples/go/common` 
(`client.go`, `permissions.go`), with `common.Tenant` replacing the two local 
structs. The access-check test moved into the `common` package alongside it.
   - **Consumer grants**: `consumerPermissions` now takes only the stream ID 
and grants `read_stream` alone. The topic existence check stays 
(`existingTopic` returns just an error). The inheritance this relies on is 
locked in by `test_stream_permission_inheritance` in 
`core/integration/tests/server/scenarios/permissions_scenario.rs`, where a 
stream-level `read_stream` alone reads topics and polls messages.
   - **ensureUser**: creation sits inside the failed-lookup branch, and both 
existing-user paths share one `UpdatePermissions` call and one log line, 
including when the create loses a race to `ErrUserAlreadyExists`.
   
   Rebased onto master, then ran `gofmt -l` (clean), `go vet ./...` and `go 
test -race ./...` in `examples/go`. I also ran the producer and the consumer 
twice each against a local `iggy-server --fresh`: the second run reuses the 
streams and users, and the read-only consumer still polls its own stream with 
the stream-level grant only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to