[NETSHELL] Network connections can't be renamed

Enable the 'Rename' and 'Delete' menu items for Administrators.
CORE-15348
This commit is contained in:
Eric Kohl 2019-06-10 17:22:11 +02:00
parent 27cfe08016
commit de0e19bc72

View 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;
}