Browse Source

Adjust permission classes in book store tutorial

resolves https://github.com/volosoft/abp-studio/issues/1488
pull/20458/head
Yunus Emre Kalkan 2 years ago
parent
commit
34cd4e2add
  1. 6
      docs/en/tutorials/book-store/part-05.md
  2. 11
      docs/en/tutorials/book-store/part-08.md

6
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";

11
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

Loading…
Cancel
Save