File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
cedar-policy-core/src/ast Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -345,15 +345,15 @@ impl Template {
345
345
)
346
346
. into_validator_generalized_slots_declaration ( schema) ?;
347
347
348
- let values_restricted_expr: HashMap < SlotId , RestrictedExpr > = values
349
- . iter ( )
350
- . map ( |( slot, entity_uid) | ( slot. clone ( ) , RestrictedExpr :: val ( entity_uid. clone ( ) ) ) )
351
- . collect ( ) ;
348
+ for ( slot, restricted_expr) in values {
349
+ // If `?principal` or `?resource` do not have type annotations
350
+ // we skip checking them
351
+ if ( slot. is_principal ( ) || slot. is_resource ( ) )
352
+ && ( validator_generalized_slots_declaration. get ( slot) . is_none ( ) )
353
+ {
354
+ continue ;
355
+ }
352
356
353
- for ( slot, restricted_expr) in generalized_values
354
- . iter ( )
355
- . chain ( values_restricted_expr. iter ( ) )
356
- {
357
357
let validator_type = validator_generalized_slots_declaration. get ( slot) . ok_or (
358
358
LinkingError :: ArityError {
359
359
unbound_values : vec ! [ slot. clone( ) ] ,
You can’t perform that action at this time.
0 commit comments