Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/MODINVOICE-557' into MODINVOICE-557
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhiiNosko committed Oct 14, 2024
2 parents 4395301 + 61a2e90 commit f2dc471
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 125 deletions.
58 changes: 32 additions & 26 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pathPattern": "/invoice/invoices",
"permissionsRequired": ["invoice.invoices.collection.get"],
"permissionsDesired": [
"invoices.bypass-acquisition-units"
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"invoice-storage.invoices.collection.get",
Expand All @@ -30,7 +30,8 @@
"invoice-storage.invoice-number.get",
"acquisitions-units-storage.units.collection.get",
"acquisitions-units-storage.memberships.collection.get",
"organizations-storage.organizations.item.get"
"organizations-storage.organizations.item.get",
"finance.ledgers.current-fiscal-year.item.get"
]
},
{
Expand All @@ -40,7 +41,7 @@
"invoice.invoices.item.get"
],
"permissionsDesired": [
"invoices.bypass-acquisition-units"
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"invoice-storage.invoices.item.get",
Expand All @@ -55,11 +56,11 @@
"permissionsRequired": ["invoice.invoices.item.put"],
"permissionsDesired": [
"invoices.acquisitions-units-assignments.manage",
"invoices.fiscal-year.update",
"invoice.item.approve",
"invoice.item.pay",
"invoice.item.cancel",
"invoices.bypass-acquisition-units"
"invoices.fiscal-year.update.execute",
"invoice.item.approve.execute",
"invoice.item.pay.execute",
"invoice.item.cancel.execute",
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"configuration.entries.collection.get",
Expand All @@ -68,7 +69,7 @@
"invoice-storage.invoices.item.get",
"invoice-storage.invoice-lines.item.put",
"invoice-storage.invoice-lines.collection.get",
"orders.bypass-acquisition-units",
"orders.acquisition-units.bypass.execute",
"orders.collection.get",
"orders.po-lines.collection.get",
"orders.po-lines.item.put",
Expand All @@ -82,7 +83,7 @@
"voucher-storage.voucher-number.get",
"acquisitions-units-storage.units.collection.get",
"acquisitions-units-storage.memberships.collection.get",
"finance.transactions.batch",
"finance.transactions.batch.execute",
"finance.transactions.collection.get",
"finance.funds.item.get",
"finance.funds.collection.get",
Expand Down Expand Up @@ -118,7 +119,7 @@
"pathPattern": "/invoice/invoice-lines",
"permissionsRequired": ["invoice.invoice-lines.collection.get"],
"permissionsDesired": [
"invoices.bypass-acquisition-units"
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"invoice-storage.invoice-lines.collection.get",
Expand Down Expand Up @@ -160,7 +161,7 @@
"pathPattern": "/invoice/invoice-lines/{id}",
"permissionsRequired": ["invoice.invoice-lines.item.get"],
"permissionsDesired": [
"invoices.bypass-acquisition-units"
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"invoice-storage.invoice-lines.item.get",
Expand All @@ -178,7 +179,7 @@
"pathPattern": "/invoice/invoice-lines/{id}",
"permissionsRequired": ["invoice.invoice-lines.item.put"],
"permissionsDesired": [
"invoices.bypass-acquisition-units"
"invoices.acquisition-units.bypass.execute"
],
"modulePermissions": [
"invoice-storage.invoice-lines.item.put",
Expand Down Expand Up @@ -716,19 +717,22 @@
"description": "Delete an existing Invoice"
},
{
"permissionName": "invoice.item.approve",
"permissionName": "invoice.item.approve.execute",
"displayName": "Invoice - approve an existing Invoice",
"description": "Approve an existing Invoice"
"description": "Approve an existing Invoice",
"replaces": ["invoice.item.approve"]
},
{
"permissionName": "invoice.item.pay",
"permissionName": "invoice.item.pay.execute",
"displayName": "Invoice - pay an existing Invoice",
"description": "Pay an existing Invoice"
"description": "Pay an existing Invoice",
"replaces": ["invoice.item.pay"]
},
{
"permissionName": "invoice.item.cancel",
"permissionName": "invoice.item.cancel.execute",
"displayName": "Invoice - cancel an existing Invoice",
"description": "Cancel an existing Invoice"
"description": "Cancel an existing Invoice",
"replaces": ["invoice.item.cancel"]
},
{
"permissionName": "invoice.invoice-lines.collection.get",
Expand Down Expand Up @@ -917,9 +921,10 @@
]
},
{
"permissionName": "invoices.bypass-acquisition-units",
"permissionName": "invoices.acquisition-units.bypass.execute",
"displayName": "Bypass acquisition units checks",
"description": "Backend internal permission to bypass invoice acquisition units checks"
"description": "Backend internal permission to bypass invoice acquisition units checks",
"replaces": ["invoices.bypass-acquisition-units"]
},
{
"permissionName": "invoices.acquisitions-units-assignments.assign",
Expand All @@ -941,9 +946,10 @@
]
},
{
"permissionName": "invoices.fiscal-year.update",
"permissionName": "invoices.fiscal-year.update.execute",
"displayName": "Invoice - update fiscal year",
"description": "Update a fiscal year"
"description": "Update a fiscal year",
"replaces": ["invoices.fiscal-year.update"]
},
{
"permissionName": "batch-groups.collection.get",
Expand Down Expand Up @@ -1057,9 +1063,9 @@
"invoice.invoices.item.post",
"invoice.invoices.item.put",
"invoice.invoices.item.delete",
"invoice.item.approve",
"invoice.item.pay",
"invoice.item.cancel",
"invoice.item.approve.execute",
"invoice.item.pay.execute",
"invoice.item.cancel.execute",
"invoice.invoice-lines.collection.get",
"invoice.invoice-lines.item.get",
"invoice.invoice-lines.item.post",
Expand Down
41 changes: 26 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
<!--Dependencies-->
<raml-module-builder.version>35.2.0</raml-module-builder.version>
<jaxb-api.version>2.3.3</jaxb-api.version>
<vertx.version>4.5.4</vertx.version>
<vertx.version>4.5.9</vertx.version>
<rest-assured.version>5.4.0</rest-assured.version>
<mod-configuration-client.version>5.10.0</mod-configuration-client.version>
<spring.version>6.1.5</spring.version>
<sshd.version>2.13.2</sshd.version>
<spring.version>6.1.12</spring.version>
<folio-di-support.version>2.1.0</folio-di-support.version>
<assertj-core.version>3.25.3</assertj-core.version>
<aspectj.version>1.9.21.1</aspectj.version>
Expand Down Expand Up @@ -89,17 +90,14 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-unit</artifactId>
<version>${vertx.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -110,24 +108,22 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-sftp</artifactId>
<version>2.9.3</version>
<version>${sshd.version}</version>
</dependency>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-spring-sftp</artifactId>
<version>2.8.0</version>
<version>${sshd.version}</version>
</dependency>
<!--vertx-rx-java required for vertx-concurrent-1.0.0 -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-rx-java</artifactId>
<version>${vertx.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-junit5</artifactId>
<version>${vertx.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -151,13 +147,11 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
Expand Down Expand Up @@ -232,25 +226,21 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -778,6 +768,27 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-stack-depchain</artifactId>
<version>${vertx.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
public enum AcqDesiredPermissions {
ASSIGN("invoices.acquisitions-units-assignments.assign"),
MANAGE("invoices.acquisitions-units-assignments.manage"),
APPROVE("invoice.item.approve"),
PAY("invoice.item.pay"),
CANCEL("invoice.item.cancel"),
FISCAL_YEAR_UPDATE("invoices.fiscal-year.update"),
BYPASS_ACQ_UNITS("invoices.bypass-acquisition-units");
APPROVE("invoice.item.approve.execute"),
PAY("invoice.item.pay.execute"),
CANCEL("invoice.item.cancel.execute"),
FISCAL_YEAR_UPDATE("invoices.fiscal-year.update.execute"),
BYPASS_ACQ_UNITS("invoices.acquisition-units.bypass.execute");

private String permission;
private static final List<String> values;
Expand Down
Loading

0 comments on commit f2dc471

Please sign in to comment.