Browse Source

Merge pull request #20473 from abpframework/auto-merge/rel-8-2/2885

Merge branch rel-8.3 with rel-8.2
pull/20474/head
maliming 2 years ago
committed by GitHub
parent
commit
f7715eaed9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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. 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 ````csharp
namespace Acme.BookStore.Permissions; namespace Acme.BookStore.Permissions;
@ -37,7 +37,11 @@ namespace Acme.BookStore.Permissions;
public static class BookStorePermissions public static class BookStorePermissions
{ {
public const string GroupName = "BookStore"; public const string GroupName = "BookStore";
// other permissions...
// other permissions...
// *** ADDED a NEW NESTED CLASS ***
public static class Books public static class Books
{ {
public const string Default = GroupName + ".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. 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 ````csharp
namespace Acme.BookStore.Permissions; namespace Acme.BookStore.Permissions;
@ -312,13 +312,8 @@ public static class BookStorePermissions
{ {
public const string GroupName = "BookStore"; public const string GroupName = "BookStore";
public static class Books // other permissions...
{ // other permissions...
public const string Default = GroupName + ".Books";
public const string Create = Default + ".Create";
public const string Edit = Default + ".Edit";
public const string Delete = Default + ".Delete";
}
// *** ADDED a NEW NESTED CLASS *** // *** ADDED a NEW NESTED CLASS ***
public static class Authors public static class Authors

Loading…
Cancel
Save