Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [2.63.4](https://github.com/filebrowser/filebrowser/compare/v2.63.3...v2.63.4) (2026-05-17)


### Bug Fixes

* show item shares from all users to admins ([#5941](https://github.com/filebrowser/filebrowser/issues/5941)) ([9cc18a8](https://github.com/filebrowser/filebrowser/commit/9cc18a81e3e1b8bf96795bfbe3d83ced294ecfd7))

## [2.63.3](https://github.com/filebrowser/filebrowser/compare/v2.63.2...v2.63.3) (2026-05-05)


Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
"vitest": "^4.1.0",
"vue-tsc": "^3.1.3"
},
"packageManager": "pnpm@10.33.3+sha512.a19744364a7e248b92657a4ca5973f9354d21caf982579674b1c539f32c7420c47138ad8b1254df07aba9bc782d9b3029e3db34d5dbff974326eb74dac8ff489"
"packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800"
}
1,248 changes: 610 additions & 638 deletions frontend/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions frontend/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Umbenennen",
"replace": "Ersetzen",
"reportIssue": "Problem melden",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Speichern",
"schedule": "Planen",
"search": "Suchen",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"rename": "Rename",
"replace": "Replace",
"reportIssue": "Report Issue",
"resumeTransfer": "Resume previous transfert",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Save",
"schedule": "Schedule",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"rename": "Renommer",
"replace": "Remplacer",
"reportIssue": "Signaler un problème",
"resumeTransfer": "Reprendre un transfert précedement interrompu",
"resumeTransferTooltip": "Ignorer tous les fichiers en conflit, sauf ceux qui sont plus petits sur le serveur, car nous supposons que leur transfert a été interrompu.",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Enregistrer",
"schedule": "Planifier",
"search": "Rechercher",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Preimenuj",
"replace": "Zamijeni",
"reportIssue": "Prijavi grešku",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Spremi",
"schedule": "Zakaži",
"search": "Pretraži",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "이름 바꾸기",
"replace": "대체",
"reportIssue": "문제 보고",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "저장",
"schedule": "일정",
"search": "검색",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/lv.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Pārdēvēt",
"replace": "Aizstāt",
"reportIssue": "Ziņot par problēmu",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Saglabāt",
"schedule": "Grafiks",
"search": "Meklēt",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Hernoemen",
"replace": "Vervangen",
"reportIssue": "Probleem melden",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Alle conflicterende bestanden overslaan, behalve de bestanden die kleiner zijn op de server, omdat we veronderstellen dat hun overdracht is onderbroken.",
"save": "Opslaan",
"schedule": "Plannen",
"search": "Zoeken",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Zmień nazwę",
"replace": "Zamień",
"reportIssue": "Zgłoś problem",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Pomiń wszystkie pliki powodujące konflikty, z wyjątkiem tych, które są mniejsze na serwerze, ponieważ podejrzewamy, że ich transfer został przerwany.",
"save": "Zapisz",
"schedule": "Harmonogram",
"search": "Szukaj",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/pt-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Mudar o nome",
"replace": "Substituir",
"reportIssue": "Reportar problema",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Guardar",
"schedule": "Agendar",
"search": "Pesquisar",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Alterar nome",
"replace": "Substituir",
"reportIssue": "Reportar erro",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Guardar",
"schedule": "Agendar",
"search": "Pesquisar",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "Переименовать",
"replace": "Перезаписать",
"reportIssue": "Сообщить о проблеме",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "Сохранить",
"schedule": "Планировка",
"search": "Поиск",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"rename": "重命名",
"replace": "替换",
"reportIssue": "报告问题",
"resumeTransfer": "Resume previous transfer",
"resumeTransferTooltip": "Skip all conflicting files, except the ones that are smaller on the server as we suppose that their transfert has been interrupted.",
"save": "保存",
"schedule": "计划",
"search": "搜索",
Expand Down
10 changes: 9 additions & 1 deletion http/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ var shareListHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
})

var shareGetsHandler = withPermShare(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
s, err := d.store.Share.Gets(r.URL.Path, d.user.ID)
var (
s []*share.Link
err error
)
if d.user.Perm.Admin {
s, err = d.store.Share.GetsByPath(r.URL.Path)
} else {
s, err = d.store.Share.Gets(r.URL.Path, d.user.ID)
}
if errors.Is(err, fberrors.ErrNotExist) {
return renderJSON(w, r, []*share.Link{})
}
Expand Down
17 changes: 17 additions & 0 deletions share/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,23 @@ func (s *Storage) Gets(path string, id uint) ([]*Link, error) {
return links, nil
}

// GetsByPath returns all non-expired links for a path.
func (s *Storage) GetsByPath(path string) ([]*Link, error) {
links, err := s.All()
if err != nil {
return nil, err
}

filtered := make([]*Link, 0, len(links))
for _, link := range links {
if link.Path == path {
filtered = append(filtered, link)
}
}

return filtered, nil
}

// Save wraps a StorageBackend.Save
func (s *Storage) Save(l *Link) error {
return s.back.Save(l)
Expand Down
85 changes: 85 additions & 0 deletions share/storage_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package share

import (
"reflect"
"testing"
)

type fakeBackend struct {
links []*Link
}

func (f fakeBackend) All() ([]*Link, error) {
return f.links, nil
}

func (f fakeBackend) FindByUserID(id uint) ([]*Link, error) {
var links []*Link
for _, link := range f.links {
if link.UserID == id {
links = append(links, link)
}
}
return links, nil
}

func (f fakeBackend) GetByHash(hash string) (*Link, error) {
for _, link := range f.links {
if link.Hash == hash {
return link, nil
}
}
return nil, nil
}

func (f fakeBackend) GetPermanent(path string, id uint) (*Link, error) {
for _, link := range f.links {
if link.Path == path && link.UserID == id && link.Expire == 0 {
return link, nil
}
}
return nil, nil
}

func (f fakeBackend) Gets(path string, id uint) ([]*Link, error) {
var links []*Link
for _, link := range f.links {
if link.Path == path && link.UserID == id {
links = append(links, link)
}
}
return links, nil
}

func (f fakeBackend) Save(_ *Link) error {
return nil
}

func (f fakeBackend) Delete(_ string) error {
return nil
}

func (f fakeBackend) DeleteWithPathPrefix(_ string) error {
return nil
}

func TestGetsByPathReturnsLinksFromAllUsers(t *testing.T) {
t.Parallel()

expected := []*Link{
{Hash: "a", Path: "/file.txt", UserID: 1},
{Hash: "b", Path: "/file.txt", UserID: 2},
}
store := NewStorage(fakeBackend{
links: append(expected, &Link{Hash: "c", Path: "/other.txt", UserID: 3}),
})

links, err := store.GetsByPath("/file.txt")
if err != nil {
t.Fatalf("GetsByPath returned error: %v", err)
}

if !reflect.DeepEqual(links, expected) {
t.Fatalf("GetsByPath returned %#v, want %#v", links, expected)
}
}
Loading