Class MemberController
- java.lang.Object
-
- eu.dnetlib.dnetrolemanagement.controllers.MemberController
-
@RestController @RequestMapping("/member") public class MemberController extends Object
-
-
Constructor Summary
Constructors Constructor Description MemberController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<Response>assignRole(String type, String id, String identifier, String email, boolean force)Assign member role to logged-in user or user with @email If role doesn't exist, use force=true to create and assign the roleorg.springframework.http.ResponseEntity<Response>createGroup(String type, String id, String description)Create a new Group for an entity (only for admins)org.springframework.http.ResponseEntity<User[]>getAll(String type, String id, boolean isManager, boolean email, boolean name)Get the user info of the members of a type(Community, etc.) with id(ee, egi, etc.)org.springframework.http.ResponseEntity<Integer>getCount(String type, String id)Get the number of the members of a type(Community, etc.) with id(ee, egi, etc.)org.springframework.http.ResponseEntity<Response>removeRole(String type, String id, String identifier, String email, boolean force)Remove member role from logged-in user or user with @email If user is an admin of this group, use force=true to revoke both roles
-
-
-
Constructor Detail
-
MemberController
@Autowired public MemberController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
-
Method Detail
-
createGroup
@RequestMapping(value="/{type:.+}/{id}/create", method=POST) public org.springframework.http.ResponseEntity<Response> createGroup(@PathVariable("type") String type, @PathVariable("id") String id, @RequestParam(value="description",required=false) String description)Create a new Group for an entity (only for admins)
-
getAll
@RequestMapping(value="/{type:.+}/{id}", method=GET) public org.springframework.http.ResponseEntity<User[]> getAll(@PathVariable("type") String type, @PathVariable("id") String id, @RequestParam(value="isManager",required=false,defaultValue="true") boolean isManager, @RequestParam(value="email",required=false,defaultValue="true") boolean email, @RequestParam(value="name",required=false,defaultValue="true") boolean name)Get the user info of the members of a type(Community, etc.) with id(ee, egi, etc.)
-
getCount
@RequestMapping(value="/{type:.+}/{id}/count", method=GET) public org.springframework.http.ResponseEntity<Integer> getCount(@PathVariable("type") String type, @PathVariable("id") String id)Get the number of the members of a type(Community, etc.) with id(ee, egi, etc.)
-
assignRole
@RequestMapping(value="/{type:.+}/{id}", method=POST) public org.springframework.http.ResponseEntity<Response> assignRole(@PathVariable("type") String type, @PathVariable("id") String id, @RequestParam(required=false) String identifier, @RequestParam(required=false) String email, @RequestParam(value="force",defaultValue="false") boolean force)Assign member role to logged-in user or user with @email If role doesn't exist, use force=true to create and assign the role
-
removeRole
@RequestMapping(value="/{type:.+}/{id}", method=DELETE) public org.springframework.http.ResponseEntity<Response> removeRole(@PathVariable("type") String type, @PathVariable("id") String id, @RequestParam(required=false) String identifier, @RequestParam(required=false) String email, @RequestParam(value="force",defaultValue="false") boolean force)Remove member role from logged-in user or user with @email If user is an admin of this group, use force=true to revoke both roles
-
-