permit-golang v1.3.0 is out v2 work is in progres...
# announcements
z
permit-golang v1.3.0 is out v2 work is in progress, and it will be released soon A maintenance release of the Go SDK’s v1 line, with bug fixes and dependency cleanup. Still supports Go 1.19 and later.
go get <http://github.com/permitio/permit-golang@v1.3.0|github.com/permitio/permit-golang@v1.3.0>
Read before upgrading • Checks now use the resource instance.
Check
,
BulkCheck
,
AllTenantsCheck
and
FilterObjects
send the resource key (from
WithID
,
WithKey
or
GetID()
), so the PDP decides per instance instead of per resource type. If you use instance-level roles or relationships, decisions can change: make sure the IDs you pass match your resource instance keys in Permit. To keep a type-level check, leave the ID and key empty. • A failed check returns an error, not a deny. If the PDP answers with a status the SDK doesn’t handle, such as a rate-limited 429, the check methods now return an error. Before,
Check
returned
false
with no error. Fixes •
ConditionSets.List
returns your condition sets; it always returned an empty list. •
ResourceActionGroups.Delete
deletes the action group. Before, it deleted the resource action with the same key. If you called it, check your resources’ actions. •
AllTenantsCheck
returns only the tenants where the action is allowed. •
Tenants.List
and
Tenants.ListByAttributes
return request errors instead of an empty list. •
WaitForSync
is safe to use concurrently and no longer affects other requests. • Context errors keep the underlying cause and status, and point to
client.Api.SetContext(ctx, project, environment)
. • Several list methods return an empty list instead of nil or a panic; a short API URL or a nil logger no longer panics. Dependencies • The SDK no longer requires
<http://golang.org/x/net|golang.org/x/net>
or
<http://golang.org/x/oauth2|golang.org/x/oauth2>
, so your module stops inheriting their old minimum versions. Questions or issues? Reply here or open an issue on github.com/permitio/permit-golang/issues>.
✅ 1
golang 1
🎉 1