From 3cf5700a3de5628461c7008e96deb69246ecf437 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Mon, 14 Oct 2024 10:52:41 +0200 Subject: [PATCH] auth:principal: use shape:meta definition --- lib/auth/auth.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/auth/auth.lisp b/lib/auth/auth.lisp index 723f7ab..a0274f8 100644 --- a/lib/auth/auth.lisp +++ b/lib/auth/auth.lisp @@ -54,9 +54,13 @@ ;;; principal (abstract / generic user object) +(defun principal-meta () + (make-instance 'shape:record-meta + :head-fields '(:organization :name) + :data-fields '(:credentials :full-name :email :role))) + (defclass principal (shape:record) - ((shape:head-fields :initform '(:organization :name)) - (shape:data-fields :initform '(:credentials :full-name :email :role)))) + ((shape:meta :initform (principal-meta) :allocation :class))) (defun make-principal (org cred &optional (cls 'principal)) (make-instance cls :head (list org (name cred))