@ -236,6 +236,88 @@ When you write this code inside your permission definition provider, it finds th
> Tip: It is better to check the value returned by the `GetPermissionOrNull` method since it may return null if the given permission was not defined.
### Permission depending on a Condition
You may want to disable a permission based on a condition. Disabled permissions are not visible on the UI and always returns `prohibited` when you check them
Permission conditions can be managed according to a condition such as a Feature, Global Feature, or a custom condition. Any condition which implements `IPermissionStateProvider` can be added via calling `AddStateProvider()` method for **PermissionDefinition**.
See examples below:
- To depend on a Global Feature
```csharp
var authorPermission = myGroup.AddPermission("Author_Management");
ASP.NET Core provides the `IAuthorizationService` that can be used to check for authorization. Once you inject, you can use it in your code to conditionally control the authorization.