authz: fix PermissionCondition type parameter
`unknown` doesn't satisfy the (recently added) `extends unknown[]` constraint. In these two cases, we can remove the parameter entirely and rely instead on the default of `unknown[]`. Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ import { conditionFor } from './conditionFor';
|
||||
export type ApplyConditionsRequest = {
|
||||
resourceRef: string;
|
||||
resourceType: string;
|
||||
conditions: PermissionCriteria<PermissionCondition<unknown>>;
|
||||
conditions: PermissionCriteria<PermissionCondition>;
|
||||
};
|
||||
|
||||
type Condition<TRule> = TRule extends PermissionRule<any, any, infer TParams>
|
||||
|
||||
@@ -48,7 +48,7 @@ export type ConditionalPolicyResult = {
|
||||
conditions: {
|
||||
pluginId: string;
|
||||
resourceType: string;
|
||||
conditions: PermissionCriteria<PermissionCondition<unknown>>;
|
||||
conditions: PermissionCriteria<PermissionCondition>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user