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
Replacement for the default `<WizardFormStep>` that only renders a step if the user has the right permissions.
1223
+
Replacement for the default `<WizardForm.Step>` that only renders a step if the user has the right permissions.
1224
1224
Use it with `<WizardForm>` from `@react-admin/ra-enterprise` to only display the steps the user has access to in the stepper.
1225
1225
1226
-
This component is provided by the `@react-admin/ra-enterprise` package.
1227
-
1228
-
Add a `name` prop to the `<WizardFormStep>` so you can reference it in the permissions.
1229
-
Then, to allow users to access a particular `<WizardFormStep>`, update the permissions definition as follows: `{ action: 'write', resource: '{RESOURCE}.step.{NAME}' }`, where `RESOURCE` is the resource name, and `NAME` the name you provided to the `<WizardFormStep>`.
1226
+
Add a `name` prop to the `<WizardForm.Step>` so you can reference it in the permissions.
1227
+
Then, to allow users to access a particular `<WizardForm.Step>`, update the permissions definition as follows: `{ action: 'write', resource: '{RESOURCE}.step.{NAME}' }`, where `RESOURCE` is the resource name, and `NAME` the name you provided to the `<WizardForm.Step>`.
1230
1228
1231
-
> For instance, to allow users access to the following tab `<WizardFormStep label="Description" name="description">` in `product` resource, add this line in permissions: `{ action: 'write', resource: 'products.step.description' }`.
1229
+
> For instance, to allow users access to the following tab `<WizardForm.Step label="Description" name="description">` in `product` resource, add this line in permissions: `{ action: 'write', resource: 'products.step.description' }`.
1232
1230
1233
-
`<WizardFormStep>` also only renders the child inputs for which the user has the 'write' permissions.
1231
+
`<WizardForm.Step>` also only renders the child inputs for which the user has the 'write' permissions.
1234
1232
1235
1233
To learn more about the permissions format, please refer to the [`@react-admin/ra-rbac` documentation](https://marmelab.com/ra-enterprise/modules/ra-rbac).
0 commit comments