Skip to content

Commit e9b42c5

Browse files
Merge branch 'develop' into OperationalRiskFix
2 parents 16dde80 + 41fdae2 commit e9b42c5

4 files changed

Lines changed: 31 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55
The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

7+
## Version 1.4.0
8+
9+
### Added
10+
- Support technical user flow.
11+
- Support codelist for custom properties.
12+
13+
### Fixed
14+
- An issue where attachments uploaded with one repository was visible when application is redeployed with another repository.
15+
716
## Version 1.3.1
817

918
### Fixed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This plugin can be consumed by the CAP application deployed on BTP to store thei
1515
- Display attachments specific to repository: Lists attachments contained in the repository that is configured with the CAP application.
1616
- Maximum allowed uploads: Provides the capability to define the maximum number of uploads allowed for the user.
1717
- Multiple attachment facets: Provides the capability to define multiple attachment facets/sections in the CAP Entity.
18+
- Technical user support: Provides the capability to consume the plugin using technical user.
1819

1920
## Table of Contents
2021

@@ -26,6 +27,7 @@ This plugin can be consumed by the CAP application deployed on BTP to store thei
2627
- [Support for Custom Properties](#support-for-custom-properties)
2728
- [Support for Maximum allowed uploads](#support-for-maximum-allowed-uploads)
2829
- [Support for Multiple attachment facets](#support-for-multiple-attachment-facets)
30+
- [Support for Technical user](#support-for-technical-user)
2931
- [Known Restrictions](#known-restrictions)
3032
- [Support, Feedback, Contributing](#support-feedback-contributing)
3133
- [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
465467
>
466468
> 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.
467469
470+
## Support for technical user
471+
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.
472+
473+
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.
474+
```cds
475+
service AdminService @(requires: ['admin', 'system-user'])
476+
```
477+
478+
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.
479+
```java
480+
request =
481+
new Request.Builder()
482+
.url(authUrl + "/oauth/token?grant_type=client_credentials")
483+
.method("POST", body)
484+
.addHeader("Authorization", basicAuth)
485+
.build();
486+
```
487+
468488
## Known Restrictions
469489

470490
- UI5 Version 1.135.0: This version causes error in upload of attachments.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</developers>
2424

2525
<properties>
26-
<revision>1.3.2-SNAPSHOT</revision>
26+
<revision>1.4.1-SNAPSHOT</revision>
2727
<java.version>17</java.version>
2828
<maven.compiler.source>${java.version}</maven.compiler.source>
2929
<maven.compiler.target>${java.version}</maven.compiler.target>

sdm/src/test/java/integration/com/sap/cds/sdm/IntegrationTest_MultipleFacet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ void testUpdateInvalidSecondaryProperty_afterEntityIsSaved_multipleAttachments()
16111611
RequestBody.create(MediaType.parse("application/json"), jsonDropdown1);
16121612
String updateSecondaryPropertyResponse1 =
16131613
api.updateSecondaryProperty(
1614-
appUrl, serviceName, entityName, facet[i], entityID3, ID[i], bodyDropdown1);
1614+
appUrl, serviceName, entityName, facet[i], entityID3, ID3[i], bodyDropdown1);
16151615
// Update secondary properties for Integer
16161616
RequestBody bodyInt =
16171617
RequestBody.create(

0 commit comments

Comments
 (0)