From: Paul Hänsch Date: Mon, 26 Feb 2024 15:48:14 +0000 (+0100) Subject: support for authentication plugins X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=5ba4b002a24bc5b1d9224b4c2eab7f5231ef51bb;p=shellwiki support for authentication plugins --- 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