forked from upstream/filebrowser
fix wrong username in share settings (#2148)
This commit is contained in:
1 parent
af08800667
commit
eabdfd9aa2
1 file changed
+6
-1
@@ -36,7 +36,12 @@ type ShareResponse struct {
|
||||
func convertToFrontendShareResponse(r *http.Request, shares []*share.Link, user *users.User) ([]*ShareResponse, error) {
|
||||
responses := make([]*ShareResponse, 0, len(shares))
|
||||
for _, s := range shares {
|
||||
username := user.Username
|
||||
// Look for the username of the user who created the share
|
||||
creator, err := store.Users.Get(s.UserID)
|
||||
username := ""
|
||||
if err == nil {
|
||||
username = creator.Username
|
||||
}
|
||||
|
||||
// Get source info to convert path to name for frontend
|
||||
sourceInfo, ok := config.Server.SourceMap[s.Source]
|
||||
|
||||
Reference in new issue
Block a user