auth:principal: use shape:meta definition
This commit is contained in:
parent
6f846ea940
commit
3cf5700a3d
1 changed files with 6 additions and 2 deletions
|
@ -54,9 +54,13 @@
|
||||||
|
|
||||||
;;; principal (abstract / generic user object)
|
;;; 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)
|
(defclass principal (shape:record)
|
||||||
((shape:head-fields :initform '(:organization :name))
|
((shape:meta :initform (principal-meta) :allocation :class)))
|
||||||
(shape:data-fields :initform '(:credentials :full-name :email :role))))
|
|
||||||
|
|
||||||
(defun make-principal (org cred &optional (cls 'principal))
|
(defun make-principal (org cred &optional (cls 'principal))
|
||||||
(make-instance cls :head (list org (name cred))
|
(make-instance cls :head (list org (name cred))
|
||||||
|
|
Loading…
Add table
Reference in a new issue