core-5322 modify sharing ui to work with new permission model