summaryrefslogtreecommitdiff
path: root/service/inetorg-delete.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'service/inetorg-delete.lisp')
-rw-r--r--service/inetorg-delete.lisp34
1 files changed, 34 insertions, 0 deletions
diff --git a/service/inetorg-delete.lisp b/service/inetorg-delete.lisp
new file mode 100644
index 0000000..d01db5d
--- /dev/null
+++ b/service/inetorg-delete.lisp
@@ -0,0 +1,34 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+(declaim (optimize (speed 0) (safety 3) (debug 3)))
+
+(in-package #:ldapadmin)
+
+;; ========================================================================== ;;
+;; inetorg-delete
+
+(defclass inetorg-delete (auth-service)
+ ((cn :initarg :cn
+ :initform nil
+ :accessor cn)
+ (location-p :initarg :location-p
+ :initform nil
+ :accessor location-p))
+ (:documentation ""))
+
+(defun inetorg-delete-json (cn)
+ (with-auth (instance inetorg-delete)
+ (setf (cn instance) cn)))
+
+;; ========================================================================== ;;
+;; inetorg-delete-submit
+
+(defclass inetorg-delete-submit (auth-service)
+ ()
+ (:documentation ""))
+
+(defun inetorg-delete-submit-json (cn)
+ (with-auth (instance inetorg-delete-submit)
+ (with-ldap (ldap)
+ (let ((ldap-user (get-ldap-user ldap cn)))
+ (delete-ldap-user ldap-user ldap)
+ (setf (message instance) "InetOrg entry deleted successfully.")))))