diff --git a/access.go b/access.go index f741cad..bad0872 100644 --- a/access.go +++ b/access.go @@ -198,11 +198,11 @@ func (b *Buckets) IsReadablePath( if err != nil { return false, err } - _, id, err := core.GetIdentityDID(identity) + _, doc, err := core.Validate(identity, nil) if err != nil { return false, err } - return instance.IsReadablePath(pth, id), nil + return instance.IsReadablePath(pth, doc.ID), nil } func (b *Buckets) IsWritablePath( @@ -223,9 +223,9 @@ func (b *Buckets) IsWritablePath( if err != nil { return false, err } - _, id, err := core.GetIdentityDID(identity) + _, doc, err := core.Validate(identity, nil) if err != nil { return false, err } - return instance.IsWritablePath(pth, id), nil + return instance.IsWritablePath(pth, doc.ID), nil } diff --git a/go.mod b/go.mod index d69d2ae..e70da6c 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/textileio/go-buckets go 1.16 -replace github.com/textileio/go-threads => ../go-threads - require ( github.com/alecthomas/jsonschema v0.0.0-20191017121752-4bb6e3fae4f2 github.com/aws/aws-sdk-go v1.32.11 // indirect @@ -74,7 +72,7 @@ require ( github.com/textileio/go-datastore-extensions v1.0.1 github.com/textileio/go-ds-badger3 v0.0.0-20210324034212-7b7fb3be3d1c github.com/textileio/go-ds-mongo v0.1.5-0.20201230201018-2b7fdca787a5 - github.com/textileio/go-threads v1.0.3-0.20210324055308-a39696dd6376 + github.com/textileio/go-threads v1.0.3-0.20210328215802-73e0ec0d7c6d github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2 // indirect github.com/xdg/stringprep v1.0.0 // indirect diff --git a/go.sum b/go.sum index ca4659b..4e70e91 100644 --- a/go.sum +++ b/go.sum @@ -1114,6 +1114,8 @@ github.com/textileio/go-ds-badger3 v0.0.0-20210324034212-7b7fb3be3d1c/go.mod h1: github.com/textileio/go-ds-mongo v0.1.4/go.mod h1:Zf6JlMPiIQUUmGlFFn5Z65C9p9LAvPg7XvX+qdGmTsU= github.com/textileio/go-ds-mongo v0.1.5-0.20201230201018-2b7fdca787a5 h1:wy2WAFw2u0RAh7Mnlnh7/Hmc9LlSADDHLlPNZQDBvmM= github.com/textileio/go-ds-mongo v0.1.5-0.20201230201018-2b7fdca787a5/go.mod h1:Zf6JlMPiIQUUmGlFFn5Z65C9p9LAvPg7XvX+qdGmTsU= +github.com/textileio/go-threads v1.0.3-0.20210328215802-73e0ec0d7c6d h1:zgw6fo8yjlOb5l3ohgWVKcbKaeQSgn8+19Ggbz4wSRQ= +github.com/textileio/go-threads v1.0.3-0.20210328215802-73e0ec0d7c6d/go.mod h1:1H3qvMKLuyuAvPmUTFGlohjBWdguzXATouiNQNXBgdo= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= github.com/tidwall/gjson v1.3.5 h1:2oW9FBNu8qt9jy5URgrzsVx/T/KSn3qn/smJQ0crlDQ= github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=