edit button

This commit is contained in:
Simon Martens
2025-05-27 15:22:50 +02:00
parent 4e13a0b5cb
commit fb8ac1b723
4 changed files with 29 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import (
"strings"
"sync"
"github.com/Theodor-Springmann-Stiftung/musenalm/dbmodels"
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers/functions"
"github.com/pocketbase/pocketbase/core"
"golang.org/x/net/websocket"
@@ -139,6 +140,10 @@ func (e *Engine) funcs() error {
// TOC
e.AddFunc("TOCFromHTML", functions.TOCFromHTML)
// User Functions
e.AddFunc("IsAdminOrEditor", dbmodels.IsAdminOrEditor)
e.AddFunc("IsAdmin", dbmodels.IsAdmin)
return nil
}