nil actions authenticate always as t

This commit is contained in:
David Botton 2022-05-03 10:01:05 -04:00
parent f09a2f6ce0
commit fae0485b5b
2 changed files with 8 additions and 5 deletions

View file

@ -102,7 +102,9 @@ for CLOG")
;;;;;;;;;;;;;;;;;;;;;
(defun is-authorized-p (role-list action)
"Given ROLE-LIST is action authorized"
(dolist (role role-list nil)
(when (member action (gethash role *authorization-hash*))
(return t))))
"Given ROLE-LIST is action authorized. If action is nil returns t."
(if action
(dolist (role role-list nil)
(when (member action (gethash role *authorization-hash*))
(return t)))
t))