From bc6f21e06b9e2daebbf7ef771b8c6f5db60ceef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 27 Oct 2020 15:52:21 +0300 Subject: [PATCH] Remove "Inject the IAuthorizationService" part --- docs/en/Tutorials/Part-5.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/en/Tutorials/Part-5.md b/docs/en/Tutorials/Part-5.md index d083d18a2e..a293ec586e 100644 --- a/docs/en/Tutorials/Part-5.md +++ b/docs/en/Tutorials/Part-5.md @@ -476,14 +476,6 @@ Adding this attribute prevents to enter this page if the current hasn't logged i The book management page has a *New Book* button and *Edit* and *Delete* actions for each book. We should hide these buttons/actions if the current user has not granted for the related permissions. -#### Inject the IAuthorizationService - -Inject the `IAuthorizationService` into the `Books.razor`: - -````csharp -@inject IAuthorizationService AuthorizationService -```` - #### Get the Permissions On Initialization Add the following code block to the end of the `Books.razor` file: @@ -506,7 +498,7 @@ Add the following code block to the end of the `Books.razor` file: } ```` -We will use these `bool` fields to check the permissions. +We will use these `bool` fields to check the permissions. `AuthorizationService` comes from the base class as an injected property. > **Blazor Tip**: While adding the C# code into a `@code` block is fine for small code parts, it is suggested to use the code behind approach to develop a more maintainable code base when the code block becomes longer. We will use this approach for the authors part.