Releases: permitio/permit-java
2.1.0
What's Changed
- Update README.md (update version to 2.0.0) by @asafc in #21
- add sdk banner by @RazcoDev in #23
- update create user schema ti support new paramets - role_assigmetns list by @gideonsmila in #25
- snyk fix issues - upgrade packages by @EliMoshkovich in #26
- Return 201 instead of 200 on user creation by @EliMoshkovich in #28
New Contributors
- @gideonsmila made their first contribution in #25
- @EliMoshkovich made their first contribution in #26
Full Changelog: 2.0.0...2.1.0
2.1.0-rc.3
snyk fix issues - upgrade packages (#26)
2.1.0-rc.2
What's Changed
- Update README.md (update version to 2.0.0) by @asafc in #21
- add sdk banner by @RazcoDev in #23
- update create user schema ti support new paramets - role_assigmetns list by @gideonsmila in #25
New Contributors
- @gideonsmila made their first contribution in #25
Full Changelog: 2.0.0...2.1.0-rc.2
v2.1.0-rc.1
What's Changed
- Update README.md (update version to 2.0.0) by @asafc in #21
- add sdk banner by @RazcoDev in #23
- update create user schema ti support new paramets - role_assigmetns list by @gideonsmila in #25
New Contributors
- @gideonsmila made their first contribution in #25
Full Changelog: 2.0.0...2.1.0-rc.1
2.0.0-rc.2
What's Changed
- Update README.md (update version to 2.0.0) by @asafc in #21
- add sdk banner by @RazcoDev in #23
- update create user schema ti support new paramets - role_assigmetns list by @gideonsmila in #25
New Contributors
- @gideonsmila made their first contribution in #25
Full Changelog: 2.0.0...2.0.0-rc.2
2.0.0
What's Changed
- update packages [snyk] by @obsd in #19
- Throw more accurate exceptions in case OPA or the PDP return an error response or timeout
- get user permissions from the PDP now returns roles as well
- get user tenants directly from the PDP:
List<TenantDetails> userTenants = permit.getUserTenants(
User.fromString("auth0|elon")
);
Breaking changes
All check functions will now throw a more accurate PermitApiError
that contains a status code as well as the actual error in case the call to OPA or the PDP fails or encounters a timeout.
Changes required in your code
You need to add a catch block to this code example, instead of:
import io.permit.sdk.Permit;
import io.permit.sdk.PermitConfig;
Permit permit = new Permit( ... );
try {
boolean permitted = permit.check(
User.fromString("[USER KEY]"),
"create",
Resource.fromString("document")
);
} catch (IOException e) {
fail("got error: " + e);
}
you'll need to also catch PermitApiError
:
import io.permit.sdk.Permit;
import io.permit.sdk.PermitConfig;
Permit permit = new Permit( ... );
try {
boolean permitted = permit.check(
User.fromString("[USER KEY]"),
"create",
Resource.fromString("document")
);
} catch (IOException e) {
fail("got error: " + e);
} catch (PermitApiError e) {
fail("got error: " + e);
}
Full Changelog: 1.4.0...2.0.0
v2.0.0-rc More accurate exceptions from check functions
What's Changed
- Throw more accurate exceptions in case OPA or the PDP return an error response or timeout
- get user permissions from the PDP now returns roles as well
- get user tenants directly from the PDP:
List<TenantDetails> userTenants = permit.getUserTenants(
User.fromString("auth0|elon")
);
Breaking changes
All check functions will now throw a more accurate PermitApiError
that contains a status code as well as the actual error in case the call to OPA or the PDP fails or encounters a timeout.
Changes required in your code
You need to add a catch block to this code example, instead of:
import io.permit.sdk.Permit;
import io.permit.sdk.PermitConfig;
Permit permit = new Permit( ... );
try {
boolean permitted = permit.check(
User.fromString("[USER KEY]"),
"create",
Resource.fromString("document")
);
} catch (IOException e) {
fail("got error: " + e);
}
you'll need to also catch PermitApiError
:
import io.permit.sdk.Permit;
import io.permit.sdk.PermitConfig;
Permit permit = new Permit( ... );
try {
boolean permitted = permit.check(
User.fromString("[USER KEY]"),
"create",
Resource.fromString("document")
);
} catch (IOException e) {
fail("got error: " + e);
} catch (PermitApiError e) {
fail("got error: " + e);
}
Full Changelog: 1.4.0...2.0.0-rc
v1.4.0 - ReBAC and advanced permission checks
v1.4.0-rc.2
- Added support for checkUrl()
- Added support for sharding key