NFIBrokerage / spear

A sharp EventStoreDB v20+ client backed by Mint :yum:
https://hex.pm/packages/spear
Apache License 2.0
85 stars 14 forks source link

fix $streams metadata stream name for working with ACLs #52

Closed the-mikedavis closed 3 years ago

the-mikedavis commented 3 years ago

caught this bug looking through the EventStoreDB front-end

The ACL functionality works with metadata, and every stream has a metadata stream which is $$<stream_name>, so for $streams, it's $$$streams. Writing directly to the $streams stream appears to have made my local EventStoreDB unhappy, although it didn't fail any tests which is odd :thinking:. This PR changes that function (and documentation) to correctly reflect the metadata stream instead of the actual stream.

Luckily we haven't used this in a production EventStoreDB since Event Store Cloud sets sane permissions on new clusters.