mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
parent
4445f41801
commit
4e082b4159
26 changed files with 937 additions and 611 deletions
|
@ -199,6 +199,7 @@ func Authorize(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
|||
context.OrgName = org.Title
|
||||
context.Administrator = false
|
||||
context.Editor = false
|
||||
context.Global = false
|
||||
|
||||
// Fetch user permissions for this org
|
||||
if context.Authenticated {
|
||||
|
@ -211,6 +212,7 @@ func Authorize(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
|||
|
||||
context.Administrator = user.Admin
|
||||
context.Editor = user.Editor
|
||||
context.Global = user.Global
|
||||
}
|
||||
|
||||
request.SetContext(r, context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue