fix(xo-web/menu): don't subscribe to proxies if not admin (#7249)

This commit is contained in:
OlivierFL 2024-01-04 11:05:53 +01:00 committed by GitHub
parent 046fa7282b
commit 95492f6f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@
- [Proxies] Fix `this.getObject` is not a function during deployment
- [Settings/Logs] Fix `sr.getAllUnhealthyVdiChainsLength: not enough permissions` error with non-admin users (PR [#7265](https://github.com/vatesfr/xen-orchestra/pull/7265))
- [Settings/Logs] Fix `proxy.getAll: not enough permissions` error with non-admin users (PR [#7249](https://github.com/vatesfr/xen-orchestra/pull/7249))
### Packages to release

View File

@ -360,7 +360,11 @@ export const subscribeRemotes = createSubscription(() => _call('remote.getAll'))
export const subscribeRemotesInfo = createSubscription(() => _call('remote.getAllInfo'))
export const subscribeProxies = createSubscription(() => _call('proxy.getAll'))
export const subscribeProxies = createSubscription(() => {
const _isAdmin = isAdmin(store.getState())
return _isAdmin ? _call('proxy.getAll') : undefined
})
export const subscribeResourceSets = createSubscription(() => _call('resourceSet.getAll'))