authz: further relaxation of PermissionCriteria type
The PermissionCriteria type is actually intended to be the type used to represent criteria for arbitrary queries, whether they are expressed as PermissionConditions or plugin-specific query fragments. As such we don't need to refer to the PermissionCondition type at all - we can stick with the TQuery type parameter as the type for the unwrapped query fragment. Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -86,5 +86,5 @@ export type PermissionCriteria<TQuery> =
|
||||
| {
|
||||
not: PermissionCriteria<TQuery>;
|
||||
}
|
||||
| PermissionCondition<unknown[]>;
|
||||
| TQuery;
|
||||
```
|
||||
|
||||
@@ -67,7 +67,7 @@ export type PermissionCriteria<TQuery> =
|
||||
| { allOf: PermissionCriteria<TQuery>[] }
|
||||
| { anyOf: PermissionCriteria<TQuery>[] }
|
||||
| { not: PermissionCriteria<TQuery> }
|
||||
| PermissionCondition<unknown[]>;
|
||||
| TQuery;
|
||||
|
||||
/**
|
||||
* An authorization response from {@link PermissionClient#authorize}.
|
||||
|
||||
Reference in New Issue
Block a user