summaryrefslogtreecommitdiff
path: root/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-15 02:59:03 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-15 02:59:03 +0000
commitfab1046560e520486f255093cbb4fe36a347f93a (patch)
treec864a6fe512aa6ae5e05928b10467a2ea04372b5 /SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
parent639a76d1912f8eb07e26b1a8f2393b682be65f2c (diff)
downloadedk2-platforms-fab1046560e520486f255093cbb4fe36a347f93a.tar.xz
Update for SecurityPkg.
Per UEFI spec, on CallBack action EFI_BROWSER_ACTION_CHANGING, the return value of ActionRequest will be ignored, but on CallBack action EFI_BROWSER_ACTION_CHANGED, the return value of ActionRequest will be used. But, EDKII browser still processes the got ActionRequest. And, all HII drivers in EDKII project also returns their expected ActionRequest value on action EFI_BROWSER_ACTION_CHANGING. Now update the browser to follow the spec, and update all core Hii drivers to keep old working modal. Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12868 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c')
-rw-r--r--SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c161
1 files changed, 123 insertions, 38 deletions
diff --git a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
index 6e5bd06502..4b1eabaaed 100644
--- a/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
+++ b/SecurityPkg/UserIdentification/UserProfileManagerDxe/UserProfileManager.c
@@ -309,7 +309,7 @@ UserProfileManagerCallback (
Status = EFI_SUCCESS;
break;
- case EFI_BROWSER_ACTION_CHANGING:
+ case EFI_BROWSER_ACTION_CHANGED:
{
//
// Handle the request from form.
@@ -338,13 +338,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_SECOND_FORM_MASK) {
//
- // Enter delete user profile form.
- //
- case KEY_ENTER_NEXT_FORM:
- SelectUserToDelete ();
- break;
-
- //
// Delete specified user profile.
//
case KEY_SELECT_USER:
@@ -369,13 +362,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_SECOND_FORM_MASK) {
//
- // Enter modify user profile form.
- //
- case KEY_ENTER_NEXT_FORM:
- SelectUserToModify ();
- break;
-
- //
// Enter user profile information form.
//
case KEY_SELECT_USER:
@@ -384,13 +370,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_INFO_MASK) {
//
- // Display user information form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModifyUserInfo ((UINT8) QuestionId);
- break;
-
- //
// Modify user name.
//
case KEY_MODIFY_NAME:
@@ -410,13 +389,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_IP_MASK) {
//
- // Display identity policy modify form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModifyIdentityPolicy ();
- break;
-
- //
// Change credential provider option.
//
case KEY_MODIFY_PROV:
@@ -442,7 +414,7 @@ UserProfileManagerCallback (
//
case KEY_IP_RETURN_UIF:
SaveIdentityPolicy ();
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
break;
default:
@@ -459,13 +431,6 @@ UserProfileManagerCallback (
//
switch (QuestionId & KEY_MODIFY_AP_MASK) {
//
- // Display access policy modify form.
- //
- case KEY_ENTER_NEXT_FORM:
- ModidyAccessPolicy ();
- break;
-
- //
// Change access right choice.
//
case KEY_MODIFY_RIGHT:
@@ -545,7 +510,7 @@ UserProfileManagerCallback (
//
case KEY_AP_RETURN_UIF:
SaveAccessPolicy ();
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
break;
default:
@@ -642,6 +607,126 @@ UserProfileManagerCallback (
}
break;
+
+ case EFI_BROWSER_ACTION_CHANGING:
+ {
+ //
+ // Handle the request from form.
+ //
+ if (Value == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Judge first 2 bits.
+ //
+ switch (QuestionId & KEY_FIRST_FORM_MASK) {
+ //
+ // Delete user profile operation.
+ //
+ case KEY_DEL_USER:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_SECOND_FORM_MASK) {
+ //
+ // Enter delete user profile form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ SelectUserToDelete ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ //
+ // Modify user profile operation.
+ //
+ case KEY_MODIFY_USER:
+ //
+ // Judge next 2 bits.
+ //
+ switch (QuestionId & KEY_SECOND_FORM_MASK) {
+ //
+ // Enter modify user profile form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ SelectUserToModify ();
+ break;
+
+ //
+ // Enter user profile information form.
+ //
+ case KEY_SELECT_USER:
+ //
+ // Judge next 3 bits.
+ //
+ switch (QuestionId & KEY_MODIFY_INFO_MASK) {
+ //
+ // Display user information form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModifyUserInfo ((UINT8) QuestionId);
+ break;
+
+ //
+ // Modify identity policy.
+ //
+ case KEY_MODIFY_IP:
+ //
+ // Judge next 3 bits
+ //
+ switch (QuestionId & KEY_MODIFY_IP_MASK) {
+ //
+ // Display identity policy modify form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModifyIdentityPolicy ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ //
+ // Modify access policy.
+ //
+ case KEY_MODIFY_AP:
+ //
+ // Judge next 3 bits.
+ //
+ switch (QuestionId & KEY_MODIFY_AP_MASK) {
+ //
+ // Display access policy modify form.
+ //
+ case KEY_ENTER_NEXT_FORM:
+ ModidyAccessPolicy ();
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
default:
//
// All other action return unsupported.