Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(xo-web/menu): do not subscribe to proxies if no permissions #7249

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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

Expand Down
6 changes: 5 additions & 1 deletion packages/xo-web/src/common/xo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand Down
Loading