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:
Mike Lewis
2021-11-11 16:53:14 +00:00
parent ea77555fe3
commit 20d3ef45e2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -86,5 +86,5 @@ export type PermissionCriteria<TQuery> =
| {
not: PermissionCriteria<TQuery>;
}
| PermissionCondition<unknown[]>;
| TQuery;
```
+1 -1
View File
@@ -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}.