-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Felix Zheng <felix.zheng@mongodb.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Shaobo He <shaobohe@amazon.com> Co-authored-by: Mark Creamer <mjcream@amazon.com> Co-authored-by: Felix Zheng <37223155+felixzheng98@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d25635f
commit 28fd705
Showing
9 changed files
with
140 additions
and
26 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
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
22 changes: 22 additions & 0 deletions
22
CedarJava/src/main/java/com/cedarpolicy/model/formatter/Config.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,22 @@ | ||
package com.cedarpolicy.model.formatter; | ||
|
||
public class Config { | ||
|
||
private final int lineWidth; | ||
private final int indentWidth; | ||
|
||
public Config(int lineWidth, int indentWidth) { | ||
this.lineWidth = lineWidth; | ||
this.indentWidth = indentWidth; | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public int getLineWidth() { | ||
return lineWidth; | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public int getIndentWidth() { | ||
return indentWidth; | ||
} | ||
} |
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
6 changes: 6 additions & 0 deletions
6
CedarJava/src/test/resources/formatted_policy_custom_config.cedar
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,6 @@ | ||
permit ( | ||
principal, | ||
action == Action::"update", | ||
resource | ||
) | ||
when { resource.owner == principal }; |
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,4 +10,4 @@ forbid ( | |
principal == User::"Liam", | ||
action, | ||
resource = Photo::"Husky.jpg" | ||
); | ||
); |
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