mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
Allow doc/section/files links to open in tabs
Closes #233 and might help #236
This commit is contained in:
parent
92696c5181
commit
9e3eac19aa
12 changed files with 886 additions and 743 deletions
|
@ -15,13 +15,14 @@ import (
|
|||
"bytes"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"github.com/documize/community/domain/auth"
|
||||
"github.com/documize/community/model/space"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/documize/community/domain/auth"
|
||||
"github.com/documize/community/model/space"
|
||||
|
||||
"github.com/documize/community/core/env"
|
||||
"github.com/documize/community/core/request"
|
||||
"github.com/documize/community/core/response"
|
||||
|
@ -161,7 +162,7 @@ func (h *Handler) Download(w http.ResponseWriter, r *http.Request) {
|
|||
canDownload = true
|
||||
}
|
||||
|
||||
if len(secureToken) == 0 && len(authToken) == 0 {
|
||||
if !canDownload && len(secureToken) == 0 && len(authToken) == 0 {
|
||||
h.Runtime.Log.Error("get attachment received no access token", err)
|
||||
response.WriteForbiddenError(w)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue