Class CuratorController
- java.lang.Object
-
- eu.dnetlib.dnetrolemanagement.controllers.CuratorController
-
@RestController @RequestMapping("/curator") public class CuratorController extends Object
-
-
Constructor Summary
Constructors Constructor Description CuratorController(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 email, boolean force)Assign curator role to logged in user or user with @emailorg.springframework.http.ResponseEntity<Response>createRole(String type, String description)Create a new Curator role (only for admins)org.springframework.http.ResponseEntity<User[]>getAll(String type, boolean email, boolean name)Get the user info of the curators of a type(Community, etc.)org.springframework.http.ResponseEntity<Response>removeRole(String type, String email)Remove curator role from logged in user or user with @email
-
-
-
Constructor Detail
-
CuratorController
@Autowired public CuratorController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
-
Method Detail
-
createRole
@RequestMapping(value="/{type:.+}/create", method=POST) public org.springframework.http.ResponseEntity<Response> createRole(@PathVariable("type") String type, @RequestParam(value="description",required=false) String description)Create a new Curator role (only for admins)
-
getAll
@RequestMapping(value="/{type:.+}", method=GET) public org.springframework.http.ResponseEntity<User[]> getAll(@PathVariable("type") String type, @RequestParam(value="email",required=false,defaultValue="true") boolean email, @RequestParam(value="name",required=false,defaultValue="true") boolean name)Get the user info of the curators of a type(Community, etc.)
-
assignRole
@RequestMapping(value="/{type:.+}", method=POST) public org.springframework.http.ResponseEntity<Response> assignRole(@PathVariable("type") String type, @RequestParam(required=false) String email, @RequestParam(value="force",defaultValue="false") boolean force)Assign curator role to logged in user or user with @email
-
-