diff options
author | Aravinth S <aravinths@ami.com> | 2025-08-20 12:38:17 +0300 |
---|---|---|
committer | Kiran Kumar Ballapalli <kirankumarb@ami.com> | 2025-09-18 16:18:26 +0300 |
commit | 99fe228eef84d018125712187e04b24a328d292b (patch) | |
tree | 1c885447c938702accf56e060f24124956ef7008 /src/store | |
parent | 399ade7239bebe83be8305bdce406043c2fef3cd (diff) | |
download | webui-vue-master.tar.xz |
Disables power operation buttons for users with
"Read-only" privileges. This change ensures that only "Operator" and
administrative users can perform power operations, preventing
unauthorized actions and enhancing system security.
Change-Id: I515ede092cef3c82a110d9534d9f8d3d6afc3135
Signed-off-by: Aravinth S <aravinths@ami.com>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/GlobalStore.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index ed3e381a8..e42367b34 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -7,6 +7,12 @@ const HOST_STATE = { diagnosticMode: 'xyz.openbmc_project.State.Host.HostState.DiagnosticMode', }; +const privilegesId = { + admin: 'Administrator', + operator: 'Operator', + readOnly: 'ReadOnly', +}; + const serverStateMapper = (hostState) => { switch (hostState) { case HOST_STATE.on: @@ -137,5 +143,6 @@ const GlobalStore = { }, }, }; +export { GlobalStore, serverStateMapper, privilegesId }; export default GlobalStore; |