Class RootController
java.lang.Object
callofproject.dev.authentication.controller.RootController
Authentication Controller
Copyleft (C), 2023, Cal-of-Project-Teams Developers.
All Rights free.
-
Constructor Summary
ConstructorsConstructorDescriptionRootController
(RootService rootService) Constructor for the RootController class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object>
giveAdminRoleToUser
(String username) Give role to User.org.springframework.http.ResponseEntity<Object>
removeAdminRoleFromUser
(String username) Remove role from User.
-
Constructor Details
-
RootController
Constructor for the RootController class. It is used to inject dependencies into the controller.- Parameters:
rootService
- The RootService object to be injected.
-
-
Method Details
-
giveAdminRoleToUser
@PostMapping("/give/role/admin") public org.springframework.http.ResponseEntity<Object> giveAdminRoleToUser(String username) Give role to User.- Parameters:
username
- represent the username- Returns:
- boolean value success or not
-
removeAdminRoleFromUser
@PostMapping("/remove/role/admin") public org.springframework.http.ResponseEntity<Object> removeAdminRoleFromUser(String username) Remove role from User.- Parameters:
username
- represent the username- Returns:
- boolean value success or not
-