From 3b6afd8a4acaa200aac8db747f2268f572620280 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 12 Sep 2022 07:46:54 +0100 Subject: [PATCH] add password slot to user class. I was having trouble trying to get hermetic and mito-auth to work together. I decided to just use normal mito and leave hermetic to the authentication/authorisation stuff. --- src/models/user.lisp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/models/user.lisp b/src/models/user.lisp index b6e21a6..fb1f5fb 100644 --- a/src/models/user.lisp +++ b/src/models/user.lisp @@ -2,12 +2,11 @@ (:use #:cl #:ritherdon-archive.db #:mito - #:mito-auth #:app-constants) (:export #:user)) (in-package #:user) -(defclass user (has-secure-password) +(defclass user () ((username :documentation "The name the user uses to log into the website." :col-type :text @@ -16,10 +15,16 @@ (display-name :documentation "The name used in the website GUI (the pretty name)." - :col-type (or :text :null) + :col-type :text :initarg :display-name :accessor display-name-of) + (password + :documentation "The user's password." + :col-type :text + :initarg :password + :accessor password-of) + (administrator :documentation "States if user has admin. priveledges. At the time of writing (11/09/2022), SQLite is the current database and it