[lxc-devel] [lxd/master] lxd/networks: Allow network deletion in projects

stgraber on Github lxc-bot at linuxcontainers.org
Wed Sep 23 03:37:30 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200922/d8bac5ea/attachment.bin>
-------------- next part --------------
From f14f82f79f89c26000e95a6af9027e6c707ba9d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 22 Sep 2020 23:37:05 -0400
Subject: [PATCH] lxd/networks: Allow network deletion in projects
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 lxd/networks.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/networks.go b/lxd/networks.go
index 4e63f182de..32a58f7043 100644
--- a/lxd/networks.go
+++ b/lxd/networks.go
@@ -46,7 +46,7 @@ var networksCmd = APIEndpoint{
 var networkCmd = APIEndpoint{
 	Path: "networks/{name}",
 
-	Delete: APIEndpointAction{Handler: networkDelete},
+	Delete: APIEndpointAction{Handler: networkDelete, AccessHandler: allowProjectPermission("networks", "manage-networks")},
 	Get:    APIEndpointAction{Handler: networkGet, AccessHandler: allowProjectPermission("networks", "view")},
 	Patch:  APIEndpointAction{Handler: networkPatch, AccessHandler: allowProjectPermission("networks", "manage-networks")},
 	Post:   APIEndpointAction{Handler: networkPost, AccessHandler: allowProjectPermission("networks", "manage-networks")},


More information about the lxc-devel mailing list