From 1803c954eeab5693d6a762e7273a5918ca720b4f Mon Sep 17 00:00:00 2001 From: "Yashmeet ." Date: Wed, 11 Jun 2025 13:46:19 +0530 Subject: [PATCH 1/4] Change Log update & Version update for release 1.4.0 --- CHANGELOG.md | 9 +++++++++ pom.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 316f80351..2129d080c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). The format is based on [Keep a Changelog](http://keepachangelog.com/). +## Version 1.4.0 + +### Added +- Support technical user flow. +- Support codelist for custom properties. + +### Fixed +- An issue where attachments uploaded with first repository was visible when application is redeployed with second repository. + ## Version 1.3.1 ### Fixed diff --git a/pom.xml b/pom.xml index 5978a400f..d657dcd1f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ - 1.3.2-SNAPSHOT + 1.4.0 17 ${java.version} ${java.version} From 0cea76219d20743dbda2f1d3b416826db596b8bc Mon Sep 17 00:00:00 2001 From: "Yashmeet ." Date: Wed, 11 Jun 2025 13:52:05 +0530 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2129d080c..df11b3000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). - Support codelist for custom properties. ### Fixed -- An issue where attachments uploaded with first repository was visible when application is redeployed with second repository. +- An issue where attachments uploaded with one repository was visible when application is redeployed with another repository. ## Version 1.3.1 From aa498375c4f9914ff5736a6fef8c7fa9a6704887 Mon Sep 17 00:00:00 2001 From: "Yashmeet ." Date: Wed, 11 Jun 2025 16:16:11 +0530 Subject: [PATCH 3/4] Update ReadME for TechnicalUser support --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 04d796091..1bf635d51 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This plugin can be consumed by the CAP application deployed on BTP to store thei - Display attachments specific to repository: Lists attachments contained in the repository that is configured with the CAP application. - Maximum allowed uploads: Provides the capability to define the maximum number of uploads allowed for the user. - Multiple attachment facets: Provides the capability to define multiple attachment facets/sections in the CAP Entity. +- Technical user support: Provides the capability to consume the plugin using technical user. ## Table of Contents @@ -26,6 +27,7 @@ This plugin can be consumed by the CAP application deployed on BTP to store thei - [Support for Custom Properties](#support-for-custom-properties) - [Support for Maximum allowed uploads](#support-for-maximum-allowed-uploads) - [Support for Multiple attachment facets](#support-for-multiple-attachment-facets) +- [Support for Technical user](#support-for-technical-user) - [Known Restrictions](#known-restrictions) - [Support, Feedback, Contributing](#support-feedback-contributing) - [Code of Conduct](#code-of-conduct) @@ -465,6 +467,24 @@ Add the following facet in _fiori-service.cds_ in the _app_ folder. Refer the fo > > Once a facet or section name is defined in the CDS file, it is strongly recommended not to modify it. For instance, in the example provided, section names such as attachments, references, and footnotes should remain unchanged after initial configuration. Renaming these sections will result in the creation of new tables, causing any data associated with the original sections to become inaccessible in the UI. +## Support for technical user +The CAP OData operations can be performed on attachments using a technical user. This flow can be used for machine-to-machine (M2M) interactions, where user involvement is not necessary. + +A leading CAP application service should add the requires with annotation "system-user". Refer the following [example](https://github.com/cap-java/sdm/blob/develop_deploy/cap-notebook/demoapp/srv/admin-service.cds) from a sample Bookshop app. +```cds +service AdminService @(requires: ['admin', 'system-user']) +``` + +The plugin supports technical users using oAuth 2.0 client credentials flow. Refer the following [example](https://github.com/cap-java/sdm/blob/a1bd1a0d829e6f25e4db349143b621757e0274d1/sdm/src/test/java/integration/com/sap/cds/sdm/IntegrationTest_SingleFacet.java#L80) of an OData call. +```java +request = + new Request.Builder() + .url(authUrl + "/oauth/token?grant_type=client_credentials") + .method("POST", body) + .addHeader("Authorization", basicAuth) + .build(); +``` + ## Known Restrictions - UI5 Version 1.135.0: This version causes error in upload of attachments. From 59306336dbc2926f9c4bc9728c12220ebfdbb2d5 Mon Sep 17 00:00:00 2001 From: "Yashmeet ." Date: Thu, 12 Jun 2025 10:49:56 +0530 Subject: [PATCH 4/4] Added Capire link for system-user --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bf635d51..cd0df4429 100644 --- a/README.md +++ b/README.md @@ -470,7 +470,7 @@ Add the following facet in _fiori-service.cds_ in the _app_ folder. Refer the fo ## Support for technical user The CAP OData operations can be performed on attachments using a technical user. This flow can be used for machine-to-machine (M2M) interactions, where user involvement is not necessary. -A leading CAP application service should add the requires with annotation "system-user". Refer the following [example](https://github.com/cap-java/sdm/blob/develop_deploy/cap-notebook/demoapp/srv/admin-service.cds) from a sample Bookshop app. +A leading CAP application's service should add the requires with annotation "system-user". For more detailed information on "system-user" within the SAP CAP framework, refer to the [Capire documentation](https://cap.cloud.sap/docs/guides/security/authorization#pseudo-roles). Here is an [example](https://github.com/cap-java/sdm/blob/develop_deploy/cap-notebook/demoapp/srv/admin-service.cds) from a sample Bookshop app demonstrating the implementation. ```cds service AdminService @(requires: ['admin', 'system-user']) ```