feat(xo-server/VIF): set MAC address requires Admin ACL on network (#5631)
Fixes #4700
This commit is contained in:
parent
6ea71ec6a2
commit
872b05a7de
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||||
|
|
||||||
|
- [VIF] To edit MAC address on a VIF, user has to be operator of the VIF and administrator of its network [#4700](https://github.com/vatesfr/xen-orchestra/issues/4700) (PR [#5631](https://github.com/vatesfr/xen-orchestra/pull/5631))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||||
@ -31,4 +33,4 @@
|
|||||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||||
|
|
||||||
- xo-server minor
|
- xo-server minor
|
||||||
- xo-web patch
|
- xo-web patch
|
@ -89,6 +89,9 @@ export async function set({
|
|||||||
|
|
||||||
if (isNetworkChanged || mac) {
|
if (isNetworkChanged || mac) {
|
||||||
const networkId = network?.id
|
const networkId = network?.id
|
||||||
|
if (mac !== undefined && this.user.permission !== 'admin') {
|
||||||
|
await this.checkPermissions(this.user.id, [[networkId ?? vif.$network, 'administrate']])
|
||||||
|
}
|
||||||
if (networkId !== undefined && this.user.permission !== 'admin') {
|
if (networkId !== undefined && this.user.permission !== 'admin') {
|
||||||
if (resourceSet !== undefined) {
|
if (resourceSet !== undefined) {
|
||||||
await this.checkResourceSetConstraints(resourceSet, this.user.id, [networkId])
|
await this.checkResourceSetConstraints(resourceSet, this.user.id, [networkId])
|
||||||
|
Loading…
Reference in New Issue
Block a user