mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
New user role: view analytics
This commit is contained in:
parent
b65a00dd1c
commit
19a916a4b4
13 changed files with 68 additions and 29 deletions
|
@ -162,6 +162,7 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
|
|||
a.Editor = true
|
||||
a.Admin = false
|
||||
a.Active = true
|
||||
a.Analytics = false
|
||||
|
||||
err = h.Store.Account.Add(ctx, a)
|
||||
if err != nil {
|
||||
|
@ -481,6 +482,7 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request) {
|
|||
a.Admin = u.Admin
|
||||
a.Active = u.Active
|
||||
a.Users = u.ViewUsers
|
||||
a.Analytics = u.Analytics
|
||||
|
||||
err = h.Store.Account.UpdateAccount(ctx, a)
|
||||
if err != nil {
|
||||
|
@ -799,6 +801,7 @@ func (h *Handler) BulkImport(w http.ResponseWriter, r *http.Request) {
|
|||
a.Editor = true
|
||||
a.Admin = false
|
||||
a.Active = true
|
||||
a.Analytics = false
|
||||
|
||||
err = h.Store.Account.Add(ctx, a)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue