From 34cd4e2add5692cae50b8abe0f95a9123d25ea7c Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 9 Aug 2024 13:48:01 +0300 Subject: [PATCH] Adjust permission classes in book store tutorial resolves https://github.com/volosoft/abp-studio/issues/1488 --- docs/en/tutorials/book-store/part-05.md | 6 +++++- docs/en/tutorials/book-store/part-08.md | 11 +++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/en/tutorials/book-store/part-05.md b/docs/en/tutorials/book-store/part-05.md index 15ab2d5a269..947eec65f05 100644 --- a/docs/en/tutorials/book-store/part-05.md +++ b/docs/en/tutorials/book-store/part-05.md @@ -29,7 +29,7 @@ ABP provides an [authorization system](../../framework/fundamentals/authorizatio A permission must have a unique name (a `string`). The best way is to define it as a `const`, so we can reuse the permission name. -Open the `BookStorePermissions` class inside the `Acme.BookStore.Application.Contracts` project (in the `Permissions` folder) and change the content as shown below: +Open the `BookStorePermissions` class inside the `Acme.BookStore.Application.Contracts` project (in the `Permissions` folder) and add new permission names: ````csharp namespace Acme.BookStore.Permissions; @@ -37,7 +37,11 @@ namespace Acme.BookStore.Permissions; public static class BookStorePermissions { public const string GroupName = "BookStore"; + + // other permissions... + // other permissions... + // *** ADDED a NEW NESTED CLASS *** public static class Books { public const string Default = GroupName + ".Books"; diff --git a/docs/en/tutorials/book-store/part-08.md b/docs/en/tutorials/book-store/part-08.md index bce32ab42e9..61412ba770e 100644 --- a/docs/en/tutorials/book-store/part-08.md +++ b/docs/en/tutorials/book-store/part-08.md @@ -303,7 +303,7 @@ public async Task DeleteAsync(Guid id) You can't compile the code since it is expecting some constants declared in the `BookStorePermissions` class. -Open the `BookStorePermissions` class inside the `Acme.BookStore.Application.Contracts` project (in the `Permissions` folder) and change the content as shown below: +Open the `BookStorePermissions` class inside the `Acme.BookStore.Application.Contracts` project (in the `Permissions` folder) and add new permission names: ````csharp namespace Acme.BookStore.Permissions; @@ -312,13 +312,8 @@ public static class BookStorePermissions { public const string GroupName = "BookStore"; - public static class Books - { - public const string Default = GroupName + ".Books"; - public const string Create = Default + ".Create"; - public const string Edit = Default + ".Edit"; - public const string Delete = Default + ".Delete"; - } + // other permissions... + // other permissions... // *** ADDED a NEW NESTED CLASS *** public static class Authors