diff options
| -rw-r--r-- | entity/ldap-user.lisp | 5 | ||||
| -rw-r--r-- | service/inetorg-add.lisp | 6 | ||||
| -rw-r--r-- | service/inetorg-modify.lisp | 6 | ||||
| -rw-r--r-- | service/inetorg-view.lisp | 6 | ||||
| -rw-r--r-- | webapps/ldapadmin/clojurescript/ldapadmin/src/core.cljs | 11 | ||||
| -rw-r--r-- | webapps/ldapadmin/site.lisp | 12 |
6 files changed, 30 insertions, 16 deletions
diff --git a/entity/ldap-user.lisp b/entity/ldap-user.lisp index aa0d64c..32837a2 100644 --- a/entity/ldap-user.lisp +++ b/entity/ldap-user.lisp @@ -32,7 +32,10 @@ :accessor telephonenumber) (mobile :initarg :mobile :initform nil - :accessor mobile)) + :accessor mobile) + (businesscategory :initarg :businesscategory + :initform nil + :accessor businesscategory)) (:documentation "A single inetOrgPerson entry from LDAP.")) (defmethod get-cn ((ldap-user ldap-user)) diff --git a/service/inetorg-add.lisp b/service/inetorg-add.lisp index a55f72d..c094375 100644 --- a/service/inetorg-add.lisp +++ b/service/inetorg-add.lisp @@ -22,6 +22,7 @@ (: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 () @@ -37,7 +38,7 @@ :accessor location-p)) (:documentation "")) -(defun inetorg-add-submit-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile) +(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 @@ -49,6 +50,7 @@ :st st :l l :telephonenumber telephonenumber - :mobile mobile))) + :mobile mobile + :businesscategory businesscategory))) (add-ldap-user ldap-user ldap) (setf (message instance) "InetOrg entry created successfully."))))) diff --git a/service/inetorg-modify.lisp b/service/inetorg-modify.lisp index e1f5577..a8b5b21 100644 --- a/service/inetorg-modify.lisp +++ b/service/inetorg-modify.lisp @@ -25,6 +25,7 @@ (:name "modify-l" :label "l" :field-type "text") (:name "modify-telephonenumber" :label "telephoneNumber" :field-type "text") (:name "modify-mobile" :label "mobile" :field-type "text") + (:name "modify-businesscategory" :label "businessCategory" :field-type "text") (:name "modify-submit" :label "Modify InetOrg Entry" :field-type "button"))) (defun inetorg-modify-json (cn) @@ -41,7 +42,7 @@ :accessor location-p)) (:documentation "")) -(defun inetorg-modify-submit-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile) +(defun inetorg-modify-submit-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory) (with-auth (instance inetorg-modify-submit) (with-ldap (ldap) (let ((ldap-user (make-instance 'ldap-user @@ -53,6 +54,7 @@ :st st :l l :telephonenumber telephonenumber - :mobile mobile))) + :mobile mobile + :businesscategory businesscategory))) (modify-ldap-user ldap-user ldap) (setf (message instance) "InetOrg entry saved successfully."))))) diff --git a/service/inetorg-view.lisp b/service/inetorg-view.lisp index 08e7914..f5bf2f2 100644 --- a/service/inetorg-view.lisp +++ b/service/inetorg-view.lisp @@ -35,6 +35,7 @@ (:name "view-l" :label "l" :field-type "text") (:name "view-telephonenumber" :label "telephoneNumber" :field-type "text") (:name "view-mobile" :label "mobile" :field-type "text") + (:name "view-businesscategory" :label "businessCategory" :field-type "text") (:name "view-submit" :label "Search InetOrg Entries" :field-type "button"))) (defun inetorg-view-search-json () @@ -53,7 +54,7 @@ :accessor location-p)) (:documentation "")) -(defun inetorg-view-results-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile) +(defun inetorg-view-results-json (givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory) (with-auth (instance inetorg-view-results) (with-ldap (ldap) (setf (results instance) @@ -66,5 +67,6 @@ (:st ,st) (:l ,l) (:telephonenumber ,telephonenumber) - (:mobile ,mobile))) + (:mobile ,mobile) + (:businesscategory ,businesscategory))) (lambda (x y) (string< (get-cn x) (get-cn y)))))))) diff --git a/webapps/ldapadmin/clojurescript/ldapadmin/src/core.cljs b/webapps/ldapadmin/clojurescript/ldapadmin/src/core.cljs index fb09c3f..268da39 100644 --- a/webapps/ldapadmin/clojurescript/ldapadmin/src/core.cljs +++ b/webapps/ldapadmin/clojurescript/ldapadmin/src/core.cljs @@ -284,6 +284,7 @@ [:th "l"] [:th "telephoneNumber"] [:th "mobile"] + [:th "businesscategory"] [:th "Del"]]] [:tbody (for [ldap-user (get jsonobj "results")] @@ -299,6 +300,7 @@ [:td {:onclick onclick} (get ldap-user "l")] [:td {:onclick onclick} (get ldap-user "telephonenumber")] [:td {:onclick onclick} (get ldap-user "mobile")] + [:td {:onclick onclick} (get ldap-user "businesscategory")] [:td [:img {:src "/static/images/edit-delete.png" :onclick (str (namespace ::x) ".on_inetorg_delete_clicked('" cn "')")}]]]))]]) @@ -317,7 +319,8 @@ :st (dommy/value (dommy/sel1 :#view-st)) :l (dommy/value (dommy/sel1 :#view-l)) :telephonenumber (dommy/value (dommy/sel1 :#view-telephonenumber)) - :mobile (dommy/value (dommy/sel1 :#view-mobile))} + :mobile (dommy/value (dommy/sel1 :#view-mobile)) + :businesscategory (dommy/value (dommy/sel1 :#view-businesscategory))} :handler handler-inetorg-view-results})) ;; ========================================================================== ;; @@ -362,7 +365,8 @@ :st (dommy/value (dommy/sel1 :#modify-st)) :l (dommy/value (dommy/sel1 :#modify-l)) :telephonenumber (dommy/value (dommy/sel1 :#modify-telephonenumber)) - :mobile (dommy/value (dommy/sel1 :#modify-mobile))} + :mobile (dommy/value (dommy/sel1 :#modify-mobile)) + :businesscategory (dommy/value (dommy/sel1 :#modify-businesscategory))} :handler handler-inetorg-modify-submit})) ;; ========================================================================== ;; @@ -441,7 +445,8 @@ :st (dommy/value (dommy/sel1 :#add-st)) :l (dommy/value (dommy/sel1 :#add-l)) :telephonenumber (dommy/value (dommy/sel1 :#add-telephonenumber)) - :mobile (dommy/value (dommy/sel1 :#add-mobile))} + :mobile (dommy/value (dommy/sel1 :#add-mobile)) + :businesscategory (dommy/value (dommy/sel1 :#add-businesscategory))} :handler handler-inetorg-add-submit})) ;; ========================================================================== ;; diff --git a/webapps/ldapadmin/site.lisp b/webapps/ldapadmin/site.lisp index f636759..f010186 100644 --- a/webapps/ldapadmin/site.lisp +++ b/webapps/ldapadmin/site.lisp @@ -57,13 +57,13 @@ `(inetorg-view-search-json)) (defmacro .inetorg-view-results () - `(inetorg-view-results-json givenname sn mail postaladdress postalcode st l telephonenumber mobile)) + `(inetorg-view-results-json givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory)) (defmacro .inetorg-modify () `(inetorg-modify-json cn)) (defmacro .inetorg-modify-submit () - `(inetorg-modify-submit-json givenname sn mail postaladdress postalcode st l telephonenumber mobile)) + `(inetorg-modify-submit-json givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory)) (defmacro .inetorg-delete () `(inetorg-delete-json cn)) @@ -75,7 +75,7 @@ `(inetorg-add-json)) (defmacro .inetorg-add-submit () - `(inetorg-add-submit-json givenname sn mail postaladdress postalcode st l telephonenumber mobile)) + `(inetorg-add-submit-json givenname sn mail postaladdress postalcode st l telephonenumber mobile businesscategory)) ;; ========================================================================== ;; @@ -88,10 +88,10 @@ (define-endpoint :get "/logout" () .logout) (define-endpoint :get "/inetorg/view" () .inetorg-view) (define-endpoint :get "/inetorg/view/search" () .inetorg-view-search) -(define-endpoint :post "/inetorg/view/results" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string)) .inetorg-view-results) +(define-endpoint :post "/inetorg/view/results" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string) (businesscategory :parameter-type 'string)) .inetorg-view-results) (define-endpoint :post "/inetorg/modify" ((cn :parameter-type 'string)) .inetorg-modify) -(define-endpoint :post "/inetorg/modify/submit" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string)) .inetorg-modify-submit) +(define-endpoint :post "/inetorg/modify/submit" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string) (businesscategory :parameter-type 'string)) .inetorg-modify-submit) (define-endpoint :post "/inetorg/delete" ((cn :parameter-type 'string)) .inetorg-delete) (define-endpoint :post "/inetorg/delete/submit" ((cn :parameter-type 'string)) .inetorg-delete-submit) (define-endpoint :get "/inetorg/add" () .inetorg-add) -(define-endpoint :post "/inetorg/add/submit" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string)) .inetorg-add-submit) +(define-endpoint :post "/inetorg/add/submit" ((givenname :parameter-type 'string) (sn :parameter-type 'string) (mail :parameter-type 'string) (postaladdress :parameter-type 'string) (postalcode :parameter-type 'string) (st :parameter-type 'string) (l :parameter-type 'string) (telephonenumber :parameter-type 'string) (mobile :parameter-type 'string) (businesscategory :parameter-type 'string)) .inetorg-add-submit) |
