I am unable to edit a network from a project as the network is not owned by that project despite being visible under the network tab and usable with instances.
Reproduction
Create a group users that have permissions on the vms project.
Defined a network in the default project, then add permissions to allow users to see the networks as follows:
This will show the network owned by the default group in the Networks tab of the vms project.
When a user attempts to edit my_network from the UI this error is triggered:
Network update failed
Failed to check OpenFGA relation: No such entity "/1.0/networks/my_network?project=vms"
Looking at the API requests this is because it is trying to set the project to vms on the network object despite it belonging to the default project.
Request URL: https://example.com/1.0/networks/my_network?project=vms
Request Method: PUT
Status Code: 404 Not Found
Expected Behaviour
Being able to edit the network forwards the users have edit and view permissions on the object.
Resolution
Is it possible to fetch the project from the network itself to resolve this problem?
As I would like to have a central place to edit network configurations and expose those to other projects (which seemed to be the case as I can see the networks in the other projects).
If this is just an incorrect way of configuring things, please let me know.
Version
LXD Version: 6.1 UI: 0.12
Issue
I am unable to edit a network from a project as the network is not owned by that project despite being visible under the network tab and usable with instances.
Reproduction
Create a group
users
that have permissions on thevms
project. Defined anetwork
in thedefault
project, then add permissions to allow users to see the networks as follows:This will show the network owned by the
default
group in the Networks tab of thevms
project.When a user attempts to edit
my_network
from the UI this error is triggered:Looking at the API requests this is because it is trying to set the project to
vms
on the network object despite it belonging to thedefault
project.Expected Behaviour
Being able to edit the network forwards the users have edit and view permissions on the object.
Resolution
Is it possible to fetch the project from the network itself to resolve this problem? As I would like to have a central place to edit network configurations and expose those to other projects (which seemed to be the case as I can see the networks in the other projects).
If this is just an incorrect way of configuring things, please let me know.
Thanks!