diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-24 16:42:01 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-24 16:42:01 -0600 |
| commit | 654b31287617c56f8e148faabc63916e316f56c6 (patch) | |
| tree | a439b6b08e2472e6bbcc813a91e219e5d09b52a0 | |
| parent | d4e3bb8f30c4b9edeb392881bd7b4a6baf79d415 (diff) | |
test: remove commented out test
| -rw-r--r-- | policies/auth_policy.cedar | 2 | ||||
| -rw-r--r-- | src/authorization/cedar_authorizer.rs | 21 |
2 files changed, 2 insertions, 21 deletions
diff --git a/policies/auth_policy.cedar b/policies/auth_policy.cedar index 27e2bd1b..c7eb6ce5 100644 --- a/policies/auth_policy.cedar +++ b/policies/auth_policy.cedar @@ -20,4 +20,4 @@ when { context.path like "*.gif" || context.path like "*.bmp" || context.path like "*.html") -};
\ No newline at end of file +}; diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs index 577b75ba..19886222 100644 --- a/src/authorization/cedar_authorizer.rs +++ b/src/authorization/cedar_authorizer.rs @@ -179,7 +179,7 @@ mod tests { fn test_cedar_authorizer_allows_static_assets() { let authorizer = CedarAuthorizer::new(); let mut headers = HashMap::new(); - headers.insert(":path".to_string(), "/static/style.css".to_string()); + headers.insert(":path".to_string(), "/public/style.css".to_string()); let request = create_request(|item: &mut HttpRequest| { item.headers = headers; }); @@ -200,23 +200,4 @@ mod tests { let result = authorizer.authorize(request); assert!(result); } - - // test css passthrough - // test javascript passthrough - // test ico passthrough - // test png,jpg,bmp passthrough - // test html passthrough - // #[test] - // fn authorize_test_css_passthrough() { - // let authorizer = CedarAuthorizer::new(); - - // let request = CheckRequest { - // attributes: Some(AttributeContext { - // ..Default::default() - // }), - // }; - // let result = authorizer.authorize(request); - - // assert!(result) - // } } |
