File tree Expand file tree Collapse file tree
src/main/java/com/faforever/api/featuredmods Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .faforever .api .featuredmods ;
22
33import com .faforever .api .data .domain .FeaturedMod ;
4+ import com .faforever .api .security .OAuthScope ;
45import com .google .common .collect .Maps ;
56import com .yahoo .elide .jsonapi .models .Data ;
67import com .yahoo .elide .jsonapi .models .JsonApiDocument ;
78import com .yahoo .elide .jsonapi .models .Resource ;
89import io .swagger .annotations .ApiOperation ;
910import org .springframework .scheduling .annotation .Async ;
11+ import org .springframework .security .access .prepost .PreAuthorize ;
1012import org .springframework .web .bind .annotation .PathVariable ;
1113import org .springframework .web .bind .annotation .RequestMapping ;
1214import org .springframework .web .bind .annotation .RequestParam ;
@@ -31,6 +33,7 @@ public FeaturedModsController(FeaturedModService featuredModService) {
3133 @ Async
3234 @ RequestMapping (path = "/{modId}/files/{version}" )
3335 @ ApiOperation ("Lists the required files for a specific featured mod version" )
36+ @ PreAuthorize ("hasScope('" + OAuthScope ._LOBBY + "')" )
3437 public CompletableFuture <JsonApiDocument > getFiles (@ PathVariable ("modId" ) int modId ,
3538 @ PathVariable ("version" ) String version ,
3639 @ RequestParam (value = "page[number]" , required = false ) Integer page ) {
You can’t perform that action at this time.
0 commit comments