@@ -68,7 +68,7 @@ pub async fn list(
6868 let key = format ! ( "{}/{}" , & params. workspace, & params. key) ;
6969 trace ! ( key, "list request" ) ;
7070
71- if !CONFIG . no_authorization && !test_rego_http ( req, "List" ) {
71+ if !CONFIG . no_authorization && !test_rego_http ( req, "List" , & key ) {
7272 return Err ( actix_web:: error:: ErrorForbidden ( "forbidden" ) ) ;
7373 }
7474
@@ -86,7 +86,7 @@ pub async fn get(
8686 let key = format ! ( "{}/{}" , & params. workspace, & params. key) ;
8787 trace ! ( key, "get request" ) ;
8888
89- if !CONFIG . no_authorization && !test_rego_http ( req, "Get" ) {
89+ if !CONFIG . no_authorization && !test_rego_http ( req, "Get" , & key ) {
9090 return Err ( actix_web:: error:: ErrorForbidden ( "forbidden" ) ) ;
9191 }
9292
@@ -119,7 +119,7 @@ pub async fn put(
119119 let key = format ! ( "{}/{}" , & params. workspace, & params. key) ;
120120 trace ! ( key, "put request" ) ;
121121
122- if !CONFIG . no_authorization && !test_rego_http ( req, "Put" ) {
122+ if !CONFIG . no_authorization && !test_rego_http ( req, "Put" , & key ) {
123123 return Err ( actix_web:: error:: ErrorForbidden ( "forbidden" ) ) ;
124124 }
125125
@@ -171,7 +171,7 @@ pub async fn delete(
171171 let key = format ! ( "{}/{}" , & params. workspace, & params. key) ;
172172 trace ! ( key, "delete request" ) ;
173173
174- if !CONFIG . no_authorization && !test_rego_http ( req, "Delete" ) {
174+ if !CONFIG . no_authorization && !test_rego_http ( req, "Delete" , & key ) {
175175 return Err ( actix_web:: error:: ErrorForbidden ( "forbidden" ) ) ;
176176 }
177177
0 commit comments