mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Export to PDF related improvements
This commit is contained in:
parent
2e9734e73e
commit
ad2e653f3c
5 changed files with 701 additions and 690 deletions
|
@ -138,10 +138,12 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
|
|||
|
||||
rc.AllowAnonymousAccess = org.AllowAnonymousAccess
|
||||
rc.OrgName = org.Title
|
||||
rc.Active = false
|
||||
rc.Administrator = false
|
||||
rc.Analytics = false
|
||||
rc.Editor = false
|
||||
rc.Global = false
|
||||
rc.Analytics = false
|
||||
rc.ViewUsers = false
|
||||
rc.AppURL = r.Host
|
||||
rc.Subdomain = organization.GetSubdomainFromHost(r)
|
||||
rc.SSL = r.TLS != nil
|
||||
|
@ -169,9 +171,11 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
|
|||
}
|
||||
|
||||
rc.Administrator = u.Admin
|
||||
rc.Active = u.Active
|
||||
rc.Analytics = u.Analytics
|
||||
rc.Editor = u.Editor
|
||||
rc.Global = u.Global
|
||||
rc.Analytics = u.Analytics
|
||||
rc.ViewUsers = u.ViewUsers
|
||||
rc.Fullname = u.Fullname()
|
||||
|
||||
// We send back with every HTTP request/response cycle the latest
|
||||
|
@ -195,7 +199,9 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
|
|||
w.Header().Add("X-Documize-Status", string(sb))
|
||||
}
|
||||
|
||||
// Debug context output
|
||||
// m.Runtime.Log.Info(fmt.Sprintf("%v", rc))
|
||||
|
||||
ctx := context.WithValue(r.Context(), domain.DocumizeContextKey, rc)
|
||||
r = r.WithContext(ctx)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue