summaryrefslogtreecommitdiff
path: root/service/auth-service.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'service/auth-service.lisp')
-rw-r--r--service/auth-service.lisp11
1 files changed, 11 insertions, 0 deletions
diff --git a/service/auth-service.lisp b/service/auth-service.lisp
index e5e7e27..1702bde 100644
--- a/service/auth-service.lisp
+++ b/service/auth-service.lisp
@@ -16,4 +16,15 @@
`(let ((,instance (make-instance ',auth-service)))
(when (string= (session-value :permissions) "admin")
,@body)
+ (when (location-p ,instance)
+ (setf (session-value :message) nil)
+ (setf (session-value :errormsg) nil))
(org-ckons-json::objects-to-json `(,,instance))))
+
+(defmacro with-noauth ((instance rest-service) &body body)
+ `(let ((,instance (make-instance ',rest-service)))
+ ,@body
+ (when (location-p ,instance)
+ (setf (session-value :message) nil)
+ (setf (session-value :errormsg) nil))
+ (org-ckons-json::objects-to-json `(,,instance))))