take out the "roles" setup
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sun, 2 Jan 2022 01:51:01 +0000 (12:51 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sun, 2 Jan 2022 01:51:01 +0000 (12:51 +1100)
manager/basic_login.lsp
manager/basic_login.sh [deleted file]
siteconfig.lsp

index 8ca9920882219ae4895b247b59b63097403d375a..38b7ac490b56a7ef827c6ac8f5e5b7808825c527 100644 (file)
@@ -5,8 +5,7 @@
 ;;
 ;; Its (main-args 0) has a final path component X.cgi that links to
 ;; this file as a packnl embedding that will use that X part of its
-;; name to determine th actual script. That lookup will also use the
-;; "role base" as declared in "roles.txt"
+;; name to determine th actual script.
 
 (load "siteconfig.lsp")
 
diff --git a/manager/basic_login.sh b/manager/basic_login.sh
deleted file mode 100755 (executable)
index 54fbcb1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-#
-# Ensure there is an HTTP_AUTHORIZATION environment variable
-# with appropriate content
-
-# root user:password
-login_check() {
-    D=$(pwd)
-    while [ ! -f $D/.htpasswd ] ; do
-       [ "$D" = "$1" ] && return 0
-       if [ "$D" = / ] ; then
-           logger BAD FAILURE
-           return 1
-       fi
-       D=$(dirname $D)
-    done
-    if [ -z "$2" ] || ! grep -q "$2" $D/.htpasswd ; then
-       cat <<EOF
-Status: 401 Unauthorized
-WWW-Authenticate: Basic realm="Hourglass"
-EOF
-       return 1
-    fi
-}
-#logger "HTTP_AUTHORIZATION=$HTTP_AUTHORIZATION"
-if login_check "$(dirname $(dirname $0))" "${HTTP_AUTHORIZATION#Basic }" ; then
-
-    cd ..
-    REMOTE_USER="$(echo -n "${HTTP_AUTHORIZATION#Basic }" | base64 -d)"
-    REMOTE_USER="${REMOTE_USER%%:*}"
-    export REMOTE_USER
-    ROLE="$(grep "^${REMOTE_USER}": roles.txt)"
-    export ROLE="${ROLE#*:}"
-    if [ -f "$ROLE/$1" ] ; then
-       echo
-       exec  /usr/local/bin/newlisp newlisp $ROLE/$1
-    fi
-fi
-cat <<EOF
-
-Broken.
-EOF
index a3bb7b67adaa4fa572a8aaa3829ca011ccd8a3f0..6c229c958cdaa0a4689f1b9cefd946b2e46d0b07 100644 (file)
@@ -23,7 +23,6 @@
          ("control.usage.tmp" set)
 
          ("wui.port" set-int)
-         ("wui.roles" set)
          ("wui.passwd" set)
          )
  )