Class CuratorController


  • @RestController
    @RequestMapping("/curator")
    public class CuratorController
    extends Object
    • 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
      • removeRole

        @RequestMapping(value="/{type:.+}",
                        method=DELETE)
        public org.springframework.http.ResponseEntity<Response> removeRole​(@PathVariable("type")
                                                                            String type,
                                                                            @RequestParam(required=false)
                                                                            String email)
        Remove curator role from logged in user or user with @email