Class SubaccountController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.settings.admin.SubaccountController
-
@Controller public class SubaccountController extends java.lang.ObjectThe controller that deals with all the admin sub-account pages
-
-
Constructor Summary
Constructors Constructor Description SubaccountController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdeleteGet(org.springframework.ui.Model model)Handles GET requests to the delete account pagejava.lang.StringdeletePost(@Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the delete account pagejava.lang.StringmanageGet(AccountWrapper subAccount, org.springframework.ui.Model model)Handles GET requests to the manage account pagejava.lang.StringmanagePost(@Valid AccountForm accountForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the manage account page, updates the username, email and roles based on the form contentsjava.lang.StringpasswordGet(org.springframework.ui.Model model)Handles GET requests to the reset password pagejava.lang.StringpasswordPost(@Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, AccountWrapper subAccount, AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the reset password page
-
-
-
Method Detail
-
manageGet
@GetMapping("/admin/manage/{pathid}") public java.lang.String manageGet(@ModelAttribute("subAccount") AccountWrapper subAccount, org.springframework.ui.Model model)Handles GET requests to the manage account page- Parameters:
subAccount- the account being managedmodel- holder for model attributes- Returns:
- the path to the manage account page
-
managePost
@PostMapping("/admin/manage/{pathid}") public java.lang.String managePost(@Valid @ModelAttribute @Valid AccountForm accountForm, org.springframework.validation.BindingResult result, @ModelAttribute("subAccount") AccountWrapper subAccount, @ModelAttribute("account") AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the manage account page, updates the username, email and roles based on the form contents- Parameters:
accountForm- the form that should be submitted in the requestresult- the results of the validation on the form abovesubAccount- the account being managedaccount- the account wrapper for the logged in usermodel- holder for model attributes- Returns:
- the path to the manage account page
-
passwordGet
@GetMapping("/admin/password/{pathid}") public java.lang.String passwordGet(org.springframework.ui.Model model)Handles GET requests to the reset password page- Parameters:
model- holder for model attributes- Returns:
- the path to the reset page
-
passwordPost
@PostMapping("/admin/password/{pathid}") public java.lang.String passwordPost(@Valid @ModelAttribute @Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, @ModelAttribute("subAccount") AccountWrapper subAccount, @ModelAttribute("account") AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the reset password page- Parameters:
passwordForm- the form that should be submitted in the requestresult- the results of the validation on the form abovesubAccount- the account being managedaccount- the account wrapper for the logged in usermodel- holder for model attributes- Returns:
- the path to the reset password page
-
deleteGet
@GetMapping("/admin/delete/{pathid}") public java.lang.String deleteGet(org.springframework.ui.Model model)Handles GET requests to the delete account page- Parameters:
model- holder for model attributes- Returns:
- the path to the delete page
-
deletePost
@PostMapping("/admin/delete/{pathid}") public java.lang.String deletePost(@Valid @ModelAttribute @Valid PasswordForm passwordForm, org.springframework.validation.BindingResult result, @ModelAttribute("subAccount") AccountWrapper subAccount, @ModelAttribute("account") AccountWrapper account, org.springframework.ui.Model model)Handles POST requests to the delete account page- Parameters:
passwordForm- the form that should be submitted in the requestresult- the results of the validation on the form abovesubAccount- the account being managedaccount- the account wrapper for the logged in usermodel- holder for model attributes- Returns:
- the path to the delete page
-
-