@@ -2,8 +2,6 @@ use axum::extract::Json;
2
2
use axum:: extract:: Path ;
3
3
use axum:: extract:: Request ;
4
4
use axum:: response:: IntoResponse ;
5
- use axum:: Extension ;
6
- use editoast_authz:: BuiltinRole ;
7
5
use editoast_derive:: EditoastError ;
8
6
use thiserror:: Error ;
9
7
use tower:: ServiceExt ;
@@ -12,8 +10,6 @@ use tower_http::services::ServeFile;
12
10
use crate :: client:: get_dynamic_assets_path;
13
11
use crate :: error:: Result ;
14
12
use crate :: generated_data:: sprite_config:: SpriteConfig ;
15
- use crate :: views:: AuthenticationExt ;
16
- use crate :: views:: AuthorizationError ;
17
13
18
14
crate :: routes! {
19
15
"/sprites" => {
@@ -61,18 +57,9 @@ async fn signaling_systems() -> Result<Json<Vec<String>>> {
61
57
) ,
62
58
) ]
63
59
async fn sprites (
64
- Extension ( auth) : AuthenticationExt ,
65
60
Path ( ( signaling_system, file_name) ) : Path < ( String , String ) > ,
66
61
request : Request ,
67
62
) -> Result < impl IntoResponse > {
68
- let authorized = auth
69
- . check_roles ( [ BuiltinRole :: MapRead ] . into ( ) )
70
- . await
71
- . map_err ( AuthorizationError :: AuthError ) ?;
72
- if !authorized {
73
- return Err ( AuthorizationError :: Forbidden . into ( ) ) ;
74
- }
75
-
76
63
let sprite_configs = SpriteConfig :: load ( ) ;
77
64
if signaling_system != "default" && !sprite_configs. contains_key ( & signaling_system) {
78
65
return Err ( SpriteErrors :: UnknownSignalingSystem { signaling_system } . into ( ) ) ;
0 commit comments