minor bugfixes and cleanup

This commit is contained in:
ston1th 2018-09-19 00:10:16 +02:00
commit 97d914bce4
26 changed files with 198 additions and 221 deletions

View file

@ -1,3 +1,5 @@
// Copyright (C) 2018 Marius Schellenberger
package db
import (
@ -166,6 +168,7 @@ func (db *DB) AdminUpdateUser(username, password string, admin bool) error {
return db.users.Set(username, u)
}
//TODO delete all user owned pages
func (db *DB) DeleteUser(username string) error {
if username == defUser {
return errors.New("user '" + defUser + "' cannot be deleted")