Browse Source
Merge pull request #8225 from abpframework/berkan/docs-update
Use Visible instead of RequiredPolicy for Blazor
pull/8283/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
docs/en/Tutorials/Part-5.md
-
BIN
docs/en/Tutorials/images/blazor-edit-book-action-2.png
|
|
|
@ -516,7 +516,7 @@ Wrap the *New Book* button by an `if` block as shown below: |
|
|
|
|
|
|
|
#### Hide the Edit/Delete Actions |
|
|
|
|
|
|
|
`EntityAction` component defines `RequiredPolicy` attribute (parameter) to conditionally show the action based on the user permissions. |
|
|
|
`EntityAction` component defines `Visible` attribute (parameter) to conditionally show the action. |
|
|
|
|
|
|
|
Update the `EntityActions` section as shown below: |
|
|
|
|
|
|
|
@ -524,11 +524,11 @@ Update the `EntityActions` section as shown below: |
|
|
|
<EntityActions TItem="BookDto" EntityActionsColumn="@EntityActionsColumn"> |
|
|
|
<EntityAction TItem="BookDto" |
|
|
|
Text="@L["Edit"]" |
|
|
|
RequiredPolicy="@UpdatePolicyName" |
|
|
|
Visible=HasUpdatePermission |
|
|
|
Clicked="() => OpenEditModalAsync(context)" /> |
|
|
|
<EntityAction TItem="BookDto" |
|
|
|
Text="@L["Delete"]" |
|
|
|
RequiredPolicy="@DeletePolicyName" |
|
|
|
Visible=HasDeletePermission |
|
|
|
Clicked="() => DeleteEntityAsync(context)" |
|
|
|
ConfirmationMessage="()=>GetDeleteConfirmationMessage(context)" /> |
|
|
|
</EntityActions> |
|
|
|
|
Width:
|
Height:
|
Size: 55 KiB
Width:
|
Height:
|
Size: 96 KiB
|