Browse Source

docs: use Visible instead of RequiredPolicy for Blazor

pull/8225/head
Berkan Sasmaz 5 years ago
parent
commit
620bfe7a7f
  1. 6
      docs/en/Tutorials/Part-5.md
  2. BIN
      docs/en/Tutorials/images/blazor-edit-book-action-2.png
  3. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json

6
docs/en/Tutorials/Part-5.md

@ -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>

BIN
docs/en/Tutorials/images/blazor-edit-book-action-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 96 KiB

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=localhost,1433;Database=MyProjectName;User=Sa;Password=Berkan8946.;"
},
"IdentityServer": {
"Clients": {

Loading…
Cancel
Save