Skip to content

Releases: permitio/permit-java

2.1.0

25 Nov 17:22
48b4ed2
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.0...2.1.0

2.1.0-rc.3

26 Sep 15:25
9064517
Compare
Choose a tag to compare
snyk fix issues - upgrade packages (#26)

2.1.0-rc.2

16 Sep 14:54
4a46933
Compare
Choose a tag to compare
2.1.0-rc.2 Pre-release
Pre-release

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

Full Changelog: 2.0.0...2.1.0-rc.2

v2.1.0-rc.1

16 Sep 14:40
4a46933
Compare
Choose a tag to compare
v2.1.0-rc.1 Pre-release
Pre-release

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

Full Changelog: 2.0.0...2.1.0-rc.1

2.0.0-rc.2

15 Sep 14:58
4a46933
Compare
Choose a tag to compare

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

Full Changelog: 2.0.0...2.0.0-rc.2

2.0.0

07 Dec 08:32
11136cc
Compare
Choose a tag to compare

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

07 Nov 09:24
c5aeb66
Compare
Choose a tag to compare

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

17 Oct 06:44
c388a80
Compare
Choose a tag to compare

What's Changed

  • Java SDK ReBAC support by @asafc in #14
  • Add support in check url and sharding key by @omer9564 in #16
  • Advanced permission checks: bulk check, check in all tenants, get user permissions by @asafc in #17

Full Changelog: 1.3.1...1.4.0

v1.4.0-rc.2

26 Jul 22:22
fe3ce2c
Compare
Choose a tag to compare
v1.4.0-rc.2 Pre-release
Pre-release
  • Added support for checkUrl()
  • Added support for sharding key

v1.4.0-rc - ReBAC support

26 Jun 06:12
0b8b9b8
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: 1.3.1...1.4.0-rc