Remove stinky code, ref #287

Tests show that this code is not needed any more.

[x] shared with user;
[x] shared with group;
[x] sharing a directory;
[x] shared by link;
[x] shared by password-protected link;