Skip to content

Commit

Permalink
Merge pull request #20474 from abpframework/auto-merge/rel-8-3/2886
Browse files Browse the repository at this point in the history
Merge branch dev with rel-8.3
  • Loading branch information
maliming authored Aug 12, 2024
2 parents a96ca55 + f7715ea commit a86eb11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion docs/en/tutorials/book-store/part-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,19 @@ 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;

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";
Expand Down
11 changes: 3 additions & 8 deletions docs/en/tutorials/book-store/part-08.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit a86eb11

Please sign in to comment.