Skip to content

Commit ae7934f

Browse files
authored
Merge pull request #13 from abap2UI5/dev
Dev
2 parents 4b8a3c7 + 0811e48 commit ae7934f

29 files changed

+501
-232
lines changed

docs/.vitepress/cache/deps/_metadata.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"hash": "1ec9cdc8",
3-
"configHash": "5fdbd13a",
2+
"hash": "34402e93",
3+
"configHash": "6d601f02",
44
"lockfileHash": "b0e705e6",
5-
"browserHash": "4fc59ccc",
5+
"browserHash": "2cf8fca0",
66
"optimized": {
77
"vue": {
88
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
99
"file": "vue.js",
10-
"fileHash": "c5a5f30b",
10+
"fileHash": "70e40748",
1111
"needsInterop": false
1212
},
1313
"vitepress > @vue/devtools-api": {
1414
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
1515
"file": "vitepress___@vue_devtools-api.js",
16-
"fileHash": "f163a942",
16+
"fileHash": "dc9a636d",
1717
"needsInterop": false
1818
},
1919
"vitepress > @vueuse/core": {
2020
"src": "../../../../node_modules/@vueuse/core/index.mjs",
2121
"file": "vitepress___@vueuse_core.js",
22-
"fileHash": "1bb31510",
22+
"fileHash": "5b276d73",
2323
"needsInterop": false
2424
},
2525
"vitepress > @vueuse/integrations/useFocusTrap": {
2626
"src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
2727
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
28-
"fileHash": "36ba8363",
28+
"fileHash": "5d75d333",
2929
"needsInterop": false
3030
},
3131
"vitepress > mark.js/src/vanilla.js": {
3232
"src": "../../../../node_modules/mark.js/src/vanilla.js",
3333
"file": "vitepress___mark__js_src_vanilla__js.js",
34-
"fileHash": "5f833050",
34+
"fileHash": "9aa05912",
3535
"needsInterop": false
3636
},
3737
"vitepress > minisearch": {
3838
"src": "../../../../node_modules/minisearch/dist/es/index.js",
3939
"file": "vitepress___minisearch.js",
40-
"fileHash": "f5399ec6",
40+
"fileHash": "d2bc5741",
4141
"needsInterop": false
4242
}
4343
},

docs/.vitepress/config.mjs

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export default defineConfig({
4949
text: 'Project', items: [
5050
{ text: 'abap2UI5', link: 'https://github.com/abap2UI5/abap2UI5' },
5151
{ text: 'samples', link: 'https://github.com/abap2UI5/samples' },
52-
{ text: 'docs', link: 'https://github.com/abap2UI5/docs' },
5352
{ text: 'frontend', link: 'https://github.com/abap2UI5/frontend' },
53+
{ text: 'docs', link: 'https://github.com/abap2UI5/docs' },
5454
{ text: 'issues', link: 'https://github.com/abap2UI5/abap2UI5/issues' },
5555
]
5656
},
@@ -92,43 +92,30 @@ export default defineConfig({
9292
collapsed: true,
9393
items: [
9494
{ text: 'General', link: '/development/general' },
95-
// { text: 'View, UI', link: '/features/' },
96-
// { text: 'Model, Data Binding', link: '/features/' },
95+
{ text: 'View', link: '/development/view' },
96+
{ text: 'Model', link: '/development/model' },
97+
{ text: 'Events, Navigation', link: '/development/events' },
98+
{ text: 'Messages, Errors', link: '/development/messages' },
9799
{ text: 'Translation, i18n', link: '/development/translation' },
98-
// { text: 'Messages', link: '/development/messages' },
99-
{ text: 'Errors', link: '/development/errors' },
100-
// { text: 'Popups, Popover', link: '/development/popups' },
101-
// { text: 'Navigation', link: '/features/' },
102-
// { text: 'Debugging', link: '/features/' },
100+
{ text: 'Popups, Popover', link: '/development/popups' },
101+
{ text: 'Debugging', link: '/development/debugging' },
103102
]
104103
},
105104
{
106105
text: 'Configuration',
107106
link: '/configuration/configuration',
108107
collapsed: true,
109108
items: [
109+
{ text: 'Installation', link: '/configuration/installation'},
110110
{ text: 'Setup', link: '/configuration/general' },
111-
// { text: 'Installation', link: '/configuration/installation'},
111+
{ text: 'Security', link: '/configuration/security' },
112+
{ text: 'Authorization', link: '/configuration/authorization' },
112113
// { text: 'Use in Production', link: '/configuration/productive_usage' },
113-
// { text: 'Security', link: '/configuration/security' },
114114
// { text: 'Performance', link: '/configuration/performance' },
115115
{ text: 'Fiori Launchpad', link: '/configuration/launchpad', },
116116
{ text: 'BTP Workzone', link: '/configuration/btp' },
117117
]
118118
},
119-
{
120-
text: 'Advanced Topics',
121-
link: '/advanced/advanced',
122-
collapsed: true,
123-
items: [
124-
{ text: 'Stateful Sessions', link: '/advanced/stateful' },
125-
{ text: 'Downporting', link: '/advanced/downporting' },
126-
{ text: 'Renaming', link: '/advanced/renaming' },
127-
// { text: 'UI5, ABAP Versions', link: '/features/faq' },
128-
// { text: 'SE80, ADT', link: '/advanced/se80' },
129-
// { text: 'Extensibility', link: '/advanced/extension' },
130-
]
131-
},
132119
{
133120
text: 'Addons', link: '/addons/addons', collapsed: true, items: [
134121
{ text: 'Runtime Typed Data', link: '/addons/srtti' },
@@ -141,17 +128,37 @@ export default defineConfig({
141128
]
142129
},
143130
{
144-
text: 'Under The Hood',
145-
link: '/insights/insights',
131+
text: 'Advanced Topics',
132+
link: '/advanced/advanced',
146133
collapsed: true,
147134
items: [
148-
{ text: 'General', link: '/insights/insights' },
149-
{ text: 'open-abap', link: '/insights/open_abap' },
150-
// { text: 'CI/CD', link: '/insights/ci' },
151-
// { text: 'abaplint', link: '/insights/ci' },
152-
// { text: 'open-abap', link: '/advanced/open_abap' },
153-
]
135+
{ text: 'Stateful Sessions', link: '/advanced/stateful' },
136+
{ text: 'Downporting', link: '/advanced/downporting' },
137+
{ text: 'Renaming', link: '/advanced/renaming' },
138+
// { text: 'UI5, ABAP Versions', link: '/features/faq' },
139+
// { text: 'SE80, ADT', link: '/advanced/se80' },
140+
// { text: 'Extensibility', link: '/advanced/extension' },
141+
{ text: 'Technical Background', link: '/advanced/renaming' , items: [
142+
{ text: 'General', link: '/insights/insights' },
143+
{ text: 'open-abap', link: '/insights/open_abap' },
144+
// { text: 'CI/CD', link: '/insights/ci' },
145+
// { text: 'abaplint', link: '/insights/ci' },
146+
// { text: 'open-abap', link: '/advanced/open_abap' },
147+
]
148+
} ]
154149
},
150+
// {
151+
// text: 'Under The Hood',
152+
// link: '/insights/insights',
153+
// collapsed: true,
154+
// items: [
155+
// { text: 'General', link: '/insights/insights' },
156+
// { text: 'open-abap', link: '/insights/open_abap' },
157+
// // { text: 'CI/CD', link: '/insights/ci' },
158+
// // { text: 'abaplint', link: '/insights/ci' },
159+
// // { text: 'open-abap', link: '/advanced/open_abap' },
160+
// ]
161+
// },
155162
{
156163
text: 'Resources',
157164
link: '/resources/resources',

docs/addons/apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
outline: [2, 6]
33
---
4-
# More
4+
# Apps, Community
55

66
#### Apps
77

docs/addons/layout.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
outline: [2, 6]
33
---
44
# Layout-Variant-Management
5+
56
<i class="fa-brands fa-github"></i> [Repository](https://github.com/abap2UI5-addons/layout-variant-management)<br>
6-
Save layouts and variants just like in classic abap with ALVs and Selection Screens.
7-
### Demos
7+
8+
Save layouts and variants just like in classic abap with ALVs and Selection Screens. This addons tries to bring back the most common functionalities:
89

910
<img width="700" alt="Google Chrome 2024-09-09 12 14 58" src="https://github.com/user-attachments/assets/5e5f9291-3817-4a66-a886-cd0ac0c6e175"><br>
1011
<img width="700" alt="Google Chrome 2024-09-09 12 15 32" src="https://github.com/user-attachments/assets/d7f39663-d864-4737-89e4-8e925e54bc2d">

docs/addons/popup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ outline: [2, 6]
55

66
<i class="fa-brands fa-github"></i> [Repository](https://github.com/abap2UI5-addons/popups)
77

8-
abap2UI5 provides a collection of built-in popups with basic functionality, as demonstrated [here.](/development/popups) However, for more advanced popup requirements, this addon provides additional options, including:
8+
abap2UI5 provides a collection of built-in popups for the most common requirements. For more advanced popup requirements, this addon provides additional popups, including:
99
* F4 Value Help
1010
* Display Transport Requests
11-
11+
* ...
1212

1313
### Demo
1414

docs/addons/srtti.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Runtime Typed Data
1+
# Runtime Typed Data with S-RTTI
22

3-
<i class="fa-brands fa-github"></i> [Repository](https://github.com/sandraros/S-RTTI)
3+
<i class="fa-brands fa-github"></i> [S-RTTI Repository](https://github.com/sandraros/S-RTTI)
44

5-
Installing this project enables abap2UI5 to use class attributes typed at runtime.
5+
abap2UI5 serializes your app instances to ensure stateless behavior in client communication. Unfortunately, the sap standard transformation features are limited, for example not supporting local types created at runtime. Fortunately the project S-RTTI fills this gap. Install it and make full use of dynamic popups, typing, and runtime-created apps.

docs/advanced/downporting.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Downporting
22

3-
Downporting the Source Code of abap2UI5 offers the possibilty to install this project on releases lower than ABAP 7.50. Check out [this blog post](https://www.linkedin.com/pulse/running-abap2ui5-older-r3-releases-downport-compatibility-abaplint-mjkle/) for more information.
3+
abap2UI5 works out of the box with ABAP version 750. If you are on a lower release, you can install the downported repositories. <br>
44

5-
All downported versions of abap2UI5 and addons can be found [here.](https://github.com/abap2UI5-downported/)
6-
7-
#### Manual Steps / Known Issues
8-
Adjusted ABAP SQL to OpenSQL: Correct Position of where eg. "WHERE id = id." <br>
9-
<img width="853" alt="image" src="https://github.com/abap2UI5/abap2UI5-downport/assets/102328295/4f35fe67-1816-4ea7-adb2-b6dc31545806">
5+
All downported versions of abap2UI5 and its addons can be found here: <br>
6+
[abap2UI5-downported](https://github.com/abap2UI5-downported/)
107
<br>
8+
9+
For more information on this concept, check out this blog post: <br>
10+
[Running abap2UI5 on older releases](https://www.linkedin.com/pulse/running-abap2ui5-older-r3-releases-downport-compatibility-abaplint-mjkle/)
11+

docs/advanced/renaming.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
# Renaming
22

3-
Renaming of abap2UI5 Artifacts allows multiple installations of this project in the same system. Check out [this blog article](https://www.linkedin.com/pulse/renaming-abap-artifacts-power-abaplint-github-actions-development-kqede/) for further information and use cases.
3+
Renaming of abap2UI5 Artifacts allows multiple installations of this project in the same system.
4+
5+
All renamed versions of abap2UI5 and its addons can be found here: <br>
6+
[abap2UI5-renamed](https://github.com/abap2UI5-renamed/)
7+
<br>
8+
9+
Check out this blog article for further information: <br>
10+
[Renaming of ABAP Artifacts - The Power of abaplint & abapGit in ABAP Development](https://www.linkedin.com/pulse/renaming-abap-artifacts-power-abaplint-github-actions-development-kqede/)

docs/advanced/stateful.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Stateful Sessions
22

3-
In Private and On-Premise scenarios abap2UI5 can also be used in stateful mode. Check out [sample 135](https://github.com/abap2UI5/samples/blob/main/src/z2ui5_cl_demo_app_135.clas.abap) or [sample 137.](https://github.com/abap2UI5/samples/blob/main/src/z2ui5_cl_demo_app_137.clas.abap)
3+
In Private and OnPremise scenarios abap2UI5 can also be used in stateful mode. Check out [sample 135](https://github.com/abap2UI5/samples/blob/main/src/z2ui5_cl_demo_app_135.clas.abap) or [sample 137.](https://github.com/abap2UI5/samples/blob/main/src/z2ui5_cl_demo_app_137.clas.abap)
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Authorization
2+
3+
abap2UI5 offers flexible ways to manage authorization handling. It doesn’t include a built-in authorization mechanism, allowing developers to create their own solutions either at the service or application level.
4+
5+
### Service-Level Authorization
6+
One of the easiest ways to manage access to different apps is by implementing checks within the HTTP handler. This approach allows the developer to restrict access to individual apps based on the APP_START parameter, directly in the ICF service handler class.
7+
8+
##### Example: Restricting Access Based on URL Parameters
9+
In this example, we use the ICF handler class to control which apps can be accessed based on the APP_START parameter in the HTTP request. If an unauthorized app is requested, access is denied.
10+
```abap
11+
CLASS z2ui5_cl_launchpad_handler DEFINITION
12+
PUBLIC
13+
FINAL
14+
CREATE PUBLIC .
15+
16+
PUBLIC SECTION.
17+
INTERFACES if_http_extension.
18+
19+
PROTECTED SECTION.
20+
PRIVATE SECTION.
21+
ENDCLASS.
22+
23+
CLASS z2ui5_cl_launchpad_handler IMPLEMENTATION.
24+
25+
METHOD if_http_extension~handle_request.
26+
" Read the app name from the request
27+
DATA(lv_app) = server->request->get_header_field( 'APP_START' ).
28+
29+
" Restrict access to a specific app
30+
IF lv_app <> 'MY_APP'.
31+
RETURN.
32+
ENDIF.
33+
34+
" Run the abap2UI5 handler
35+
z2ui5_cl_http_handler=>run( server ).
36+
ENDMETHOD.
37+
38+
ENDCLASS.
39+
```
40+
##### Using Authorization Objects in Service Handlers
41+
You can also use the SAP authorization objects:
42+
```abap
43+
CLASS z2ui5_cl_launchpad_handler DEFINITION
44+
PUBLIC
45+
FINAL
46+
CREATE PUBLIC .
47+
48+
PUBLIC SECTION.
49+
INTERFACES if_http_extension.
50+
51+
PROTECTED SECTION.
52+
PRIVATE SECTION.
53+
ENDCLASS.
54+
55+
CLASS z2ui5_cl_launchpad_handler IMPLEMENTATION.
56+
57+
METHOD if_http_extension~handle_request.
58+
" Read the app name from the request
59+
DATA(lv_app) = server->request->get_header_field( 'APP_START' ).
60+
61+
" Perform an authorization check
62+
AUTHORITY-CHECK OBJECT 'Z_APP_AUTH'
63+
ID 'APP' FIELD lv_app.
64+
65+
IF sy-subrc <> 0.
66+
" Authorization failed, deny access
67+
RETURN.
68+
ENDIF.
69+
70+
" Run the abap2UI5 handler if authorized
71+
z2ui5_cl_http_handler=>run( server ).
72+
ENDMETHOD.
73+
ENDCLASS.
74+
```
75+
76+
### Application-Level Authorization
77+
Alternatively, you can handle authorization within individual app classes. This approach is useful if you want to delegate authorization to each app, ensuring that it checks user permissions before performing any actions.
78+
79+
##### Example: Authorization Check in an App Class
80+
In this method, each app is responsible for checking the user’s permissions, similar to how it's done in traditional SAP ABAP applications.
81+
abap
82+
```abap
83+
CLASS z2ui5_cl_demo_app_001 DEFINITION PUBLIC.
84+
PUBLIC SECTION.
85+
INTERFACES z2ui5_if_app.
86+
PROTECTED SECTION.
87+
PRIVATE SECTION.
88+
ENDCLASS.
89+
90+
CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION.
91+
92+
METHOD z2ui5_if_app~main.
93+
" Perform an authorization check before launching the app
94+
AUTHORITY-CHECK OBJECT 'Z_APP_AUTH'
95+
ID 'APP' FIELD 'Z2UI5_APP_001'.
96+
97+
IF sy-subrc <> 0.
98+
" Authorization failed, deny access
99+
RETURN.
100+
ENDIF.
101+
102+
" Continue with app processing if authorized
103+
" (App logic goes here)
104+
ENDMETHOD.
105+
106+
ENDCLASS.
107+
```
108+
109+
::: tip Information
110+
If you don't implement authorization checks at the app level, make sure that end users cannot bypass service-level authorization checks by navigating between apps.
111+
:::

0 commit comments

Comments
 (0)