[sharing] respect "sharing allowed" setting in the share dialog

don't display a checkbox to allow resharing if it was disabled by the admin

fix #2824 

cc @nickvergessen  @jancborchardt @MorrisJobke