Class SuperAdminController
- java.lang.Object
-
- eu.dnetlib.dnetrolemanagement.controllers.SuperAdminController
-
@RestController @RequestMapping("/super") public class SuperAdminController extends Object
-
-
Constructor Summary
Constructors Constructor Description SuperAdminController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<Response>assignRole(String email, boolean superAdmin)Assign portal admin role to user with @emailorg.springframework.http.ResponseEntity<Response>createRole(String name, String description)Create a new role (only for admins)org.springframework.http.ResponseEntity<List<User>>getUsersByEmail(String email)org.springframework.http.ResponseEntity<Response>removeRole(String email, boolean superAdmin)Remove portal admin role from logged in user or user with @email
-
-
-
Constructor Detail
-
SuperAdminController
@Autowired public SuperAdminController(RegistryService registryService, AuthoritiesUpdater authoritiesUpdater)
-
-
Method Detail
-
createRole
@RequestMapping(value="/create", method=POST) public org.springframework.http.ResponseEntity<Response> createRole(@RequestParam("name") String name, @RequestParam(value="description",required=false) String description)Create a new role (only for admins)
-
assignRole
@RequestMapping(value="/assign", method=POST) public org.springframework.http.ResponseEntity<Response> assignRole(@RequestParam(required=false) String email, @RequestParam(required=false,defaultValue="false") boolean superAdmin)Assign portal admin role to user with @email
-
removeRole
@RequestMapping(value="/remove", method=DELETE) public org.springframework.http.ResponseEntity<Response> removeRole(@RequestParam(required=false) String email, @RequestParam(required=false,defaultValue="false") boolean superAdmin)Remove portal admin role from logged in user or user with @email
-
-