From 038a9da1ae021f3aef91317c50f8baf3d7fef5bb Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Fri, 17 Apr 2020 11:22:56 -0700
Subject: Add dynamic AccountService Roles

Get roles on local user management privilege dropdown
from /redfish/v1/AccountService/Roles instead of hard-coded
values.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I00409b17fc1a2a49b880883749c0241e0aae283e
---
 src/views/AccessControl/LocalUserManagement/ModalUser.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/views/AccessControl/LocalUserManagement/ModalUser.vue')

diff --git a/src/views/AccessControl/LocalUserManagement/ModalUser.vue b/src/views/AccessControl/LocalUserManagement/ModalUser.vue
index a9c0f6c5..f4a66e79 100644
--- a/src/views/AccessControl/LocalUserManagement/ModalUser.vue
+++ b/src/views/AccessControl/LocalUserManagement/ModalUser.vue
@@ -225,7 +225,6 @@ export default {
   },
   data() {
     return {
-      privilegeTypes: ['Administrator', 'Operator', 'ReadOnly', 'NoAccess'],
       originalUsername: '',
       form: {
         status: true,
@@ -246,6 +245,9 @@ export default {
     },
     manualUnlockPolicy() {
       return !this.accountSettings.accountLockoutDuration;
+    },
+    privilegeTypes() {
+      return this.$store.getters['localUsers/accountRoles'];
     }
   },
   watch: {
-- 
cgit v1.2.3

