You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This control is intended to be used when you want to show or hide components based on the user its permissions. The control can be used to check the user’s permissions on the current site / list were the solution is loaded, or on a remote site / list.
3
+
This control is intended to be used when you want to show or hide components based on the user its permissions. The control can be used to check the user’s permissions on the current site / list were the solution is loaded, or on a remote site / list.
4
4
5
-
## Usage
6
-
### Checking permissions on the current site
5
+
## How to use this control in your solutions
6
+
7
+
- Check that you installed the `@pnp/spfx-controls-react` dependency. Check out the [getting started](../#getting-started) page for more information about installing the dependency.
@@ -41,3 +55,18 @@ This control is intended to be used when you want to show or hide components bas
41
55
{/* Specify the components to load when user has the required permissions */}
42
56
</SecurityTrimmedControl>
43
57
```
58
+
59
+
## Implementation
60
+
61
+
The `SecurityTrimmedControl` can be configured with the following properties:
62
+
63
+
| Property | Type | Required | Description |
64
+
| ---- | ---- | ---- | ---- |
65
+
| context | WebPartContext or ApplicationCustomizerContext or FieldCustomizerContext or ListViewCommandSetContext | yes | Context of the web part, application customizer, field customizer, or list view command set. |
66
+
| permissions | SPPermission[]| yes | The permissions to check for the user. |
67
+
| level | PermissionLevel | yes | Specify where to check the user permissions: current site or list / remote site or list. |
68
+
| remoteSiteUrl | string | no | The URL of the remote site. Required when you want to check permissions on remote site or list. |
69
+
| relativeLibOrListUrl | string | no | The relative URL of the list or library. Required when you want to check permissions on remote list. |
0 commit comments