|
|
@ -280,21 +280,11 @@ public async Task CreateAsync(CreateAuthorDto input) |
|
|
|
|
|
|
|
|
## Check a Permission in JavaScript |
|
|
## Check a Permission in JavaScript |
|
|
|
|
|
|
|
|
You may need to check a policy/permission on the client side. |
|
|
See the following documents to learn how to re-use the authorization system on the client side: |
|
|
|
|
|
|
|
|
### MVC UI |
|
|
* [ASP.NET Core MVC / Razor Pages UI: Authorization](UI/AspNetCore/JavaScript-API/Auth.md) |
|
|
|
|
|
* [Angular UI Authorization](UI/Angular/Permission-Management.md) |
|
|
For ASP.NET Core MVC / Razor Pages applications, you can use the `abp.auth` API. |
|
|
* [Blazor UI Authorization](UI/Blazor/Authorization.md) |
|
|
|
|
|
|
|
|
**Example: Check if a given permission has been granted for the current user** |
|
|
|
|
|
|
|
|
|
|
|
```js |
|
|
|
|
|
abp.auth.isGranted('MyPermissionName'); |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Angular UI |
|
|
|
|
|
|
|
|
|
|
|
See the [permission management document](UI/Angular/Permission-Management.md) for the Angular UI. |
|
|
|
|
|
|
|
|
|
|
|
## Permission Management |
|
|
## Permission Management |
|
|
|
|
|
|
|
|
|