Skip to content

Commit

Permalink
MODUSERBL-202 clean up permissions (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx authored Oct 24, 2024
1 parent 7a172c6 commit 74d051e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
23 changes: 16 additions & 7 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@
{
"methods": ["GET"],
"pathPattern": "/bl-users/by-username/{id}",
"permissionsRequired": [
"users-bl.item.get",
"perms.users.get"
],
"permissionsRequired": ["users-bl.users-by-username.item.get"],
"modulePermissions": [
"users.item.get",
"users.collection.get",
Expand All @@ -83,7 +80,7 @@
{
"methods": ["GET"],
"pathPattern": "/bl-users/by-id/{id}",
"permissionsRequired": ["users-bl.item.get", "perms.users.get"],
"permissionsRequired": ["users-bl.item.get"],
"modulePermissions": [
"users.item.get",
"users.collection.get",
Expand Down Expand Up @@ -124,7 +121,7 @@
{
"methods": ["GET"],
"pathPattern": "/bl-users/by-username/{name}/open-transactions",
"permissionsRequired": ["users-bl.transactions.get"],
"permissionsRequired": ["users-bl.transactions-by-username.get"],
"modulePermissions": [
"users.collection.get",
"circulation-storage.loans.collection.get",
Expand Down Expand Up @@ -294,6 +291,11 @@
"displayName" : "users-bl item get",
"description" : "Get a single composite user record by id"
},
{
"permissionName" : "users-bl.users-by-username.item.get",
"displayName" : "users-bl item get by username",
"description" : "Get a single composite user record by username"
},
{
"permissionName" : "users-bl.item.post",
"displayName" : "users-bl item post",
Expand Down Expand Up @@ -329,20 +331,27 @@
"displayName": "users-bl transactions get",
"description": "Get summary of open transactions of user record"
},
{
"permissionName": "users-bl.transactions-by-username.get",
"displayName": "users-bl transactions get by username",
"description": "Get summary of open transactions of user record by its username"
},
{
"permissionName" : "users-bl.all",
"displayName" : "users-bl all",
"description" : "All user business-logic permissions",
"subPermissions" : [
"users-bl.collection.get",
"users-bl.users-by-username.item.get",
"users-bl.item.get",
"users-bl.item.post",
"users-bl.item.put",
"users-bl.item.delete",
"users-bl.password-reset-link.generate",
"users-bl.password-reset-link.validate",
"users-bl.password-reset-link.reset",
"users-bl.transactions.get"
"users-bl.transactions.get",
"users-bl.transactions-by-username.get"
],
"visible" : false
}
Expand Down
18 changes: 17 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<raml-module-builder.version>35.3.0</raml-module-builder.version>
<mod-configuration-client.version>5.10.0</mod-configuration-client.version>
<ramlfiles_path>${basedir}/ramls</ramlfiles_path>
<vertx-version>4.5.10</vertx-version>
<java.version>17</java.version>
<aspectj.version>1.9.22.1</aspectj.version>

<!--Folio dependencies properties-->
<mod-configuration-client.version>5.10.0</mod-configuration-client.version>
<folio-module-descriptor-validator.version>1.0.0</folio-module-descriptor-validator.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -466,6 +469,19 @@
</configuration>
</plugin>

<plugin>
<groupId>org.folio</groupId>
<artifactId>folio-module-descriptor-validator</artifactId>
<version>${folio-module-descriptor-validator.version}</version>
<executions>
<execution>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

Expand Down

0 comments on commit 74d051e

Please sign in to comment.