Check for share by link enabled

Display "Shared by link" section only if sharing by link is enabled.
Merge pull request #12805 from Gadzy/patch-1

Check for share by link enabled