From 0ed1cba1b39daaf8eef693233f081b455c88dece Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Mon, 21 Dec 2020 08:59:56 -0700 Subject: stuff --- service/inetorg-add.lisp | 56 ------------------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 service/inetorg-add.lisp (limited to 'service/inetorg-add.lisp') diff --git a/service/inetorg-add.lisp b/service/inetorg-add.lisp deleted file mode 100644 index c094375..0000000 --- a/service/inetorg-add.lisp +++ /dev/null @@ -1,56 +0,0 @@ -;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- -(declaim (optimize (speed 0) (safety 3) (debug 3))) - -(in-package #:ldapadmin) - -;; ========================================================================== ;; -;; inetorg-add - -(defclass inetorg-add (auth-service generic-form) - ((instructions :initarg :instructions - :initform nil - :accessor instructions)) - (:documentation "")) - -(define-generic-form-constructor (inetorg-add "inetorg-add-form" "/inetorg/add/submit") - '((:name "add-givenname" :label "givenName" :field-type "text") - (:name "add-sn" :label "sn" :field-type "text") - (:name "add-mail" :label "mail" :field-type "text") - (:name "add-postaladdress" :label "postalAddress" :field-type "text") - (:name "add-postalcode" :label "postalCode" :field-type "text") - (:name "add-st" :label "st" :field-type "text") - (:name "add-l" :label "l" :field-type "text") - (:name "add-telephonenumber" :label "telephoneNumber" :field-type "text") - (:name "add-mobile" :label "mobile" :field-type "text") - (:name "add-businesscategory" :label "businessCategory" :field-type "text") - (:name "add-submit" :label "Create InetOrg Entry" :field-type "button"))) - -(defun inetorg-add-json () - (with-auth (instance inetorg-add) - (setf (instructions instance) "Use the form to add a new InetOrg entry."))) - -;; ========================================================================== ;; -;; inetorg-add-submit - -(defclass inetorg-add-submit (auth-service) - ((location-p :initarg :location-p - :initform nil - :accessor location-p)) - (:documentation "")) - -(defun inetorg-add-submit-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory) - (with-auth (instance inetorg-add-submit) - (with-ldap (ldap) - (let ((ldap-user (make-instance 'ldap-user - :givenname givenname - :sn sn - :mail mail - :postaladdress postaladdress - :postalcode postalcode - :st st - :l l - :telephonenumber telephonenumber - :mobile mobile - :businesscategory businesscategory))) - (add-ldap-user ldap-user ldap) - (setf (message instance) "InetOrg entry created successfully."))))) -- cgit v1.3