auth:principal: use shape:meta definition

This commit is contained in:
Helmut Merz 2024-10-14 10:52:41 +02:00
parent 6f846ea940
commit 3cf5700a3d

View file

@ -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))