-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from permitio/gidi/per-11143-add-check-against…
…-opa-directly-to-java-sdk Add new ability to get user permissions via opa directly
- Loading branch information
Showing
9 changed files
with
179 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ build | |
|
||
# Ignore stg schemas | ||
stg-schemas/ | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/io/permit/sdk/enforcement/UserPermissionsOpa.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.permit.sdk.enforcement; | ||
|
||
import java.util.HashMap; | ||
|
||
/** | ||
* The {@code UserPermissionsOPA} class represents all the objects a user can access. | ||
*/ | ||
final public class UserPermissionsOpa { | ||
private String decisionId; | ||
private HashMap<String, ObjectPermissions> result; | ||
|
||
// Getters and setters | ||
public String getDecisionId() { | ||
return decisionId; | ||
} | ||
|
||
public void setDecisionId(String decisionId) { | ||
this.decisionId = decisionId; | ||
} | ||
|
||
public HashMap<String, ObjectPermissions> getResult() { | ||
return result; | ||
} | ||
|
||
public void setResult(HashMap<String, ObjectPermissions> result) { | ||
this.result = result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters