From 5ba4b002a24bc5b1d9224b4c2eab7f5231ef51bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 26 Feb 2024 16:48:14 +0100 Subject: [PATCH] support for authentication plugins --- auth/default.sh | 3 +++ index.cgi | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 auth/default.sh diff --git a/auth/default.sh b/auth/default.sh new file mode 100644 index 0000000..816ad70 --- /dev/null +++ b/auth/default.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +. "$_EXEC/cgilite/users.sh" diff --git a/index.cgi b/index.cgi index 79e5e00..c121c38 100755 --- a/index.cgi +++ b/index.cgi @@ -14,22 +14,22 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR # IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -. "${_EXEC:-${0%/*}}/cgilite/cgilite.sh" -. "${_EXEC}/cgilite/session.sh" -. "${_EXEC}/cgilite/users.sh" -. "${_EXEC}/tools.sh" -. "${_EXEC}/acl.sh" - export REV_PAGES=${REV_PAGES:-true} export REV_ATTACHMENTS=${REV_ATTACHMENTS:-false} export WIKI_THEME="${WIKI_THEME:-default}" export SEARCH_INDEX="${SEARCH_INDEX:-true}" +export USER_AUTH="${USER_AUTH:-default}" + +. "${_EXEC:-${0%/*}}/cgilite/cgilite.sh" +. "${_EXEC}/cgilite/session.sh" +. "${_EXEC}/auth/${USER_AUTH}.sh" +. "${_EXEC}/tools.sh" +. "${_EXEC}/acl.sh" +. "${_EXEC}/themes/${WIKI_THEME}.sh" which git >/dev/null || REV_PAGES=false [ "$REV_PAGES" != true ] && REV_ATTACHMENTS=false -. "${_EXEC}/themes/${WIKI_THEME}.sh" - # Renew session cookie, only if cookie already set [ "$(COOKIE session)" ] && SESSION_COOKIE -- 2.39.2