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

View file

@ -202,7 +202,8 @@ optional WHERE and ORDER-BY sql."
value where key=PAGE or if FOLLOW-URL-PAGE is true PAGE is default
page if no second on path otherwise page is the second on path (first
must be base-url). If comment-table is nil no comments are shown. User
must authorize on CAN-COMMENT, CAN-SHOW-COMMENTS and if CAN-EDIT."
must authorize on action set by CAN-COMMENT, CAN-SHOW-COMMENTS and if
CAN-EDIT unless they are set to nil."
(lambda (obj)
(let* ((body (connection-body obj))
(prof (profile (get-web-site body)))