Skip to content

Commit 122224e

Browse files
authored
feat: Add sw-app-user-id header (#1893)
1 parent 6225325 commit 122224e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

guides/integrations-api/general-concepts/request-headers.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,11 @@ POST /api/search/product
7878
## sw-app-integration-id
7979

8080
The `sw-app-integration-id` enables seamless connection and data exchange between different software components. This header is required for correct permission checks performed by the backend when fetching or manipulating data. It overrides the default behavior and uses the privileges provided by the app. This is used in the Meteor Admin SDK for the [Repository Data Handling](/resources/admin-extension-sdk/api-reference/data/repository). But the developer itself doesn’t need to care about it because it is handled automatically by the admin.
81+
82+
## sw-app-user-id
83+
84+
The `sw-app-user-id` header allows apps to execute API requests in the context of a specific user. When this header is included, the system calculates the effective permissions by intersecting the user's permissions with the app's permissions, ensuring that the request runs with the most restrictive permissions from both sources.
85+
86+
This header is particularly useful when an app needs to perform actions on behalf of a user while maintaining proper permission boundaries.
87+
88+
To use the `sw-app-user-id` header, the specified user must either be an admin user, have explicit permission for the specific app, or have the `app.all` permission.

0 commit comments

Comments
 (0)