Skip to content

Commit 0f8c66c

Browse files
Merge branch 'main' into update-cds-cli-texts
2 parents 816e217 + 959a8a9 commit 0f8c66c

File tree

6 files changed

+208
-202
lines changed

6 files changed

+208
-202
lines changed

.vitepress/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ config.rewrites = rewrites
106106
// Add custom capire info to the theme config
107107
config.themeConfig.capire = {
108108
versions: {
109-
java_services: '4.2.0',
110-
java_cds4j: '4.2.0'
109+
java_services: '4.3.0',
110+
java_cds4j: '4.3.0'
111111
},
112112
gotoLinks: []
113113
}

about/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,16 @@ Keeping pace with a rapidly changing world of volatile cloud technologies and pl
378378
## What about AI? <UnderConstruction/>
379379

380380
- AI provides tremendous boosts to productivity → for example:
381-
- **Coding Assists** → for example, by [Copilot](https://en.wikipedia.org/wiki/Microsoft_Copilot) in `.cds`, `.js`, even `.md` sources
381+
- **Coding Assists** → for example, by [GitHub Copilot](https://github.com/features/copilot) in `.cds`, `.js`, even `.md` sources
382382
- **Code Analysis** → detecting [bad practices](bad-practices) → guiding to [best practices](best-practices)
383383
- **Code Generation** → for example, for tests, test data, ...
384384
- **Project Scaffolding** → for quick head starts
385-
- **Search & Learning Assists** → like Maui, ...
385+
- **Search & Learning Assists** → like SAP Joule, ...
386386
- But this doesn't replace the need for **Human Intelligence**!
387387
- There's a different between a GPT-generated one-off thesis and long-lived enterprise software, which needs to adapt and scale to new requirements.
388-
- **CAP itself** is a major contribution to AI → its simple, clear concepts, uniform ways to implement and consume services, capire, its openness and visibility in the public world, ...
388+
389+
By **embracing and advocating standard tooling** like VS Code and GitHub Actions, CAP ensures its projects are day-one beneficiaries of new AI features rolled out there.
390+
391+
**CAP itself** is a major contribution to AI → its simple, clear concepts, uniform ways to implement and consume services make it easier for AIs and humans alike to reason about the system.
392+
393+
Its openness and public visibility helped influence the very first AI models — even the original ChatGPT knew some CAP, and its baked-in knowledge of it has since improved dramatically.

guides/security/authorization.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ A privilege is met, if and only if **all properties are fulfilled** for the curr
284284

285285
```cds
286286
entity Orders @(restrict: [
287-
{ grant: 'READ', to: 'Auditor', where: 'AuditBy = $user' }
287+
{ grant: 'READ', to: 'Auditor', where: (AuditBy = $user) }
288288
]) {/*...*/}
289289
```
290290

@@ -303,7 +303,7 @@ You can build restrictions based on *multiple privileges*:
303303
```cds
304304
entity Orders @(restrict: [
305305
{ grant: ['READ','WRITE'], to: 'Admin' },
306-
{ grant: 'READ', where: 'buyer = $user' }
306+
{ grant: 'READ', where: (buyer = $user) }
307307
]) {/*...*/}
308308
```
309309

@@ -313,8 +313,8 @@ Similarly, the filter conditions of matched privileges are combined with logical
313313

314314
```cds
315315
entity Orders @(restrict: [
316-
{ grant: 'READ', to: 'Auditor', where: 'country = $user.country' },
317-
{ grant: ['READ','WRITE'], where: 'CreatedBy = $user' },
316+
{ grant: 'READ', to: 'Auditor', where: (country = $user.country) },
317+
{ grant: ['READ','WRITE'], where: (CreatedBy = $user) },
318318
]) {/*...*/}
319319
```
320320

@@ -374,7 +374,7 @@ service CustomerService @(requires: 'authenticated-user') {
374374
action addRating (stars: Integer);
375375
}
376376
entity Orders @(restrict: [
377-
{ grant: '*', to: 'Customer', where: 'CreatedBy = $user' }
377+
{ grant: '*', to: 'Customer', where: (CreatedBy = $user) }
378378
]) {/*...*/}
379379
action monthlyBalance @(requires: 'Vendor') ();
380380
}
@@ -499,14 +499,14 @@ For instance, a user is allowed to read or edit `Orders` (defined with the `mana
499499

500500
```cds
501501
annotate Orders with @(restrict: [
502-
{ grant: ['READ', 'UPDATE', 'DELETE'], where: 'CreatedBy = $user' } ]);
502+
{ grant: ['READ', 'UPDATE', 'DELETE'], where: (CreatedBy = $user) } ]);
503503
```
504504

505505
Or a `Vendor` can only edit articles on stock (that means `Articles.stock` positive):
506506

507507
```cds
508508
annotate Articles with @(restrict: [
509-
{ grant: ['UPDATE'], to: 'Vendor', where: 'stock > 0' } ]);
509+
{ grant: ['UPDATE'], to: 'Vendor', where: (stock > 0) } ]);
510510
```
511511

512512
You can define `where`-conditions in restrictions based on [CQL](/cds/cql)-where-clauses.<br>
@@ -550,7 +550,7 @@ service SalesService @(requires: ['SalesAdmin', 'SalesManager']) {
550550
entity SalesOrgs @(restrict: [
551551
{ grant: '*',
552552
to: ['SalesAdmin', 'SalesManager'],
553-
where: '$user.country = countryCode or $user.country is null' } ]) {
553+
where: ($user.country = countryCode or $user.country is null) } ]) {
554554
countryCode: String; /*...*/
555555
}
556556
}
@@ -564,7 +564,7 @@ service SalesService @(requires: ['SalesAdmin', 'SalesManager']) {
564564
entity SalesOrgs @(restrict: [
565565
{ grant: '*',
566566
to: 'SalesManager',
567-
where: '$user.country = countryCode' },
567+
where: ($user.country = countryCode) },
568568
{ grant: '*',
569569
to: 'SalesAdmin' } ]) {
570570
countryCode: String; /*...*/
@@ -583,7 +583,7 @@ You can leverage the `exists` predicate in `where` conditions to define filters
583583
service ProjectService @(requires: 'authenticated-user') {
584584
entity Projects @(restrict: [
585585
{ grant: ['READ', 'WRITE'],
586-
where: 'exists members[userId = $user and role = `Editor`]' } ]) {
586+
where: (exists members[userId = $user and role = `Editor`]) } ]) {
587587
members: Association to many Members; /*...*/
588588
}
589589
@readonly entity Members {
@@ -601,7 +601,7 @@ Supported features of `exists` predicate:
601601
* Use target paths (`where: 'exists a1.b1[...]`).
602602
* Usage of [user attributes](#user-attrs).
603603
::: warning
604-
Paths *inside* the filter (`where: 'exists a1[b1.c = ...]`) are not yet supported.
604+
Paths *inside* the filter (`where: (exists a1[b1.c = ...])`) are not yet supported.
605605
:::
606606

607607
<!-- * Note that in the Node.js stack, variant `a1[b1.c = ...]` only works on SAP HANA (as `b1.c` is a path expression). -->
@@ -614,7 +614,7 @@ The following example demonstrates the last two features:
614614
service ProductsService @(requires: 'authenticated-user') {
615615
entity Products @(restrict: [
616616
{ grant: '*',
617-
where: 'exists producers.division[$user.division = name]'}]): cuid {
617+
where: (exists producers.division[$user.division = name])}]): cuid {
618618
producers : Association to many ProducingDivisions
619619
on producers.product = $self;
620620
}
@@ -647,7 +647,7 @@ The `where`-condition in a restriction can also contain [CQL path expressions](/
647647
service SalesOrderService @(requires: 'authenticated-user') {
648648
entity SalesOrders @(restrict: [
649649
{ grant: 'READ',
650-
where: 'product.productType = $user.productType' } ]) {
650+
where: (product.productType = $user.productType) } ]) {
651651
product: Association to one Products;
652652
}
653653
entity Products {
@@ -683,7 +683,7 @@ Have a closer look at this example:
683683
service CatalogService @(requires: 'authenticated-user') {
684684
entity Books @(restrict: [
685685
{ grant: 'READ' },
686-
{ grant: 'WRITE', to: 'Vendor', where: '$user.publishers = publisher' },
686+
{ grant: 'WRITE', to: 'Vendor', where: ($user.publishers = publisher) },
687687
{ grant: 'WRITE', to: 'Admin' } ])
688688
as projection on db.Books;
689689
action doAccounting @(requires: ['Accountant', 'Admin']) ();
@@ -704,7 +704,7 @@ service CatalogService @(requires: 'authenticated-user') {
704704
service VendorService @(requires: 'Vendor') {
705705
entity Books @(restrict: [
706706
{ grant: 'READ' },
707-
{ grant: 'WRITE', to: 'vendor', where: '$user.publishers = publisher' } ])
707+
{ grant: 'WRITE', to: 'vendor', where: ($user.publishers = publisher) } ])
708708
as projection on db.Books;
709709
}
710710

java/versions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ New features are announced in the [CAP Release notes](/releases/).
3333
Find detailed information about versions and release in the [CAP release schedule](../releases/schedule#cap-java).
3434

3535
::: warning Consume latest versions
36-
We strongly recommend to consume the latest minor version on a monthly basis to keep future migration efforts as small as possible.
36+
We strongly recommend to **consume the latest minor version on a monthly basis** to keep future migration efforts as small as possible.
3737

38-
Likewise, we strongly recommend to consume the latest patch version as soon as possible to receive critical bug fixes.
38+
Likewise, we strongly recommend to **consume the latest patch version as soon as possible** to receive critical bug fixes including security patches.
3939
:::
4040

4141
### Active Version { #active-version }

0 commit comments

Comments
 (0)