https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de0e19bc72452bb0bda219bbbe8c1fed6b7d2a5e

commit de0e19bc72452bb0bda219bbbe8c1fed6b7d2a5e
Author:     Eric Kohl <[email protected]>
AuthorDate: Mon Jun 10 17:22:11 2019 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Mon Jun 10 17:23:13 2019 +0200

    [NETSHELL] Network connections can't be renamed
    
    Enable the 'Rename' and 'Delete' menu items for Administrators.
    CORE-15348
---
 dll/shellext/netshell/connectmanager.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dll/shellext/netshell/connectmanager.cpp 
b/dll/shellext/netshell/connectmanager.cpp
index 0ca8651e527..2cb697ce450 100644
--- a/dll/shellext/netshell/connectmanager.cpp
+++ b/dll/shellext/netshell/connectmanager.cpp
@@ -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;
 }
 

Reply via email to