Use root node to determine delete permission

An external link is always read-only, so it’s inappropriate to use its
read/write mode to determine if the link should be deleted. Now the
delete dialog uses the root node.
Fixed _writegroup bug

Caused by code refactoring.