[stable31] Reflect public shares in isPublic flag and fix permission check
#56836
+89
−9
isPublic flag and fix permission check
#56836