Note about anonymous link shares (#4905)

<!-- PR description-->

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-12-22 11:43:28 +05:30 committed by GitHub
parent 8c0ac505a2
commit c3b15a00bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,11 @@ func DiffLinkShares(current, expected []LinkShare) ([]LinkShare, []LinkShare) {
filteredExpected := []LinkShare{}
for _, ls := range current {
// It is useless to restore link shares without associated
// entities. When we do a link share restore, it always creates
// a new link(we cannot reuse the old link). Since we
// have no way of knowing the users who previously had access to
// an item via link, we don't have a reason to restore the link.
if len(ls.Entities) == 0 {
continue
}