Class AdminController
- java.lang.Object
-
- eu.dnetlib.dnetrolemanagement.controllers.AdminController
-
@RestController @RequestMapping("/admin") public class AdminController extends Object
-
-
Constructor Summary
Constructors Constructor Description AdminController(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 email, String identifier, boolean force)Assign admin role to logged-in user or user with @email If role doesn't exist or user is not a member of this group already, use force=true to create and assign both roles.org.springframework.http.ResponseEntity<User[]>getAll(String type, String id, boolean email, boolean name)Get the user info of the managers of a type(Community, etc.) with id(ee, egi, etc.)org.springframework.http.ResponseEntity<Response>removeRole(String type, String id, String identifier, String email)Remove admin role from logged-in user or user with @email
-
-
-
Constructor Detail
-
AdminController
@Autowired public AdminController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
-
Method Detail
-
getAll
@RequestMapping(value="/{type:.+}/{id}", method=GET) public org.springframework.http.ResponseEntity<User[]> getAll(@PathVariable("type") String type, @PathVariable("id") String id, @RequestParam(value="email",required=false,defaultValue="true") boolean email, @RequestParam(value="name",required=false,defaultValue="true") boolean name)Get the user info of the managers 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 email, @RequestParam(required=false) String identifier, @RequestParam(value="force",defaultValue="false") boolean force)Assign admin role to logged-in user or user with @email If role doesn't exist or user is not a member of this group already, use force=true to create and assign both roles.
-
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)Remove admin role from logged-in user or user with @email
-
-