Class SubaccountController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.settings.admin.SubaccountController
-
@Controller public class SubaccountController extends java.lang.Object
The 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.String
deleteGet(org.springframework.ui.Model model)
Handles GET requests to the delete account pagejava.lang.String
deletePost(@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.String
manageGet(AccountWrapper subAccount, org.springframework.ui.Model model)
Handles GET requests to the manage account pagejava.lang.String
managePost(@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.String
passwordGet(org.springframework.ui.Model model)
Handles GET requests to the reset password pagejava.lang.String
passwordPost(@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
-
-