[NETSHELL] Network connections can't be renamed
authorEric Kohl <eric.kohl@reactos.org>
Mon, 10 Jun 2019 15:22:11 +0000 (17:22 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 10 Jun 2019 15:23:13 +0000 (17:23 +0200)
Enable the 'Rename' and 'Delete' menu items for Administrators.
CORE-15348

dll/shellext/netshell/connectmanager.cpp

index 0ca8651..2cb697c 100644 (file)
@@ -290,6 +290,16 @@ CNetConnection::GetProperties(NETCON_PROPERTIES **ppProps)
         CoTaskMemFree(pStr);
     }
 
+    /* Enable 'Rename' and 'Delete' for Adminstrators only */
+    if (IsUserAdmin())
+    {
+        pProperties->dwCharacter |= (NCCF_ALLOW_RENAME | NCCF_ALLOW_REMOVAL);
+    }
+    else
+    {
+        pProperties->dwCharacter &= ~(NCCF_ALLOW_RENAME | NCCF_ALLOW_REMOVAL);
+    }
+
     return S_OK;
 }