Package io.meeds.social.space.rest
Class UserSpacesRest
java.lang.Object
io.meeds.social.space.rest.UserSpacesRest
Lists the spaces of a profile owner as they are visible to the current user.
@Secured("users") is the correct and sufficient annotation, and an
external viewer is deliberately served by it: the roles extractor adds the
users role to any identity already carrying externals, so the annotation
cannot discriminate an external viewer. That discrimination lives in the
Service, which is also where the requested scope is narrowed (eXIP 7.3.0.18,
note 50524, decision D5). This layer validates parameters and nothing else.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserSpaces(jakarta.servlet.http.HttpServletRequest request, String username, io.meeds.social.space.constant.UserSpacesScope scope, int offset, int limit, boolean returnSize)
-
Constructor Details
-
UserSpacesRest
public UserSpacesRest()
-
-
Method Details
-
getUserSpaces
@GetMapping("/{username}/spaces") @Secured("users") public UserSpaceList getUserSpaces(jakarta.servlet.http.HttpServletRequest request, @PathVariable("username") String username, @RequestParam(name="scope",required=false) io.meeds.social.space.constant.UserSpacesScope scope, @RequestParam(name="offset",required=false,defaultValue="0") int offset, @RequestParam(name="limit",required=false,defaultValue="20") int limit, @RequestParam(name="returnSize",required=false,defaultValue="false") boolean returnSize)
-