Skip to content

Commit

Permalink
Update session.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sgohl authored Apr 17, 2024
1 parent e44ae2e commit f4e67cc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions wish/lib/session.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,28 @@ then
unset SESSION
fi

Public() {

## a list of public URLs accessible without Login
## while they're secured by Guard/Role

if grep -q -o ${URI} /www/app/public.txt
then

return 0

fi

}

Guard() {

## To show an element for only logged-in users, Guard must be chained with &&
## or via if-block
## example: Guard && Fragment foobar

Public

if [[ ! -f ${PATH_SESSION}/${SESSION} ]]
then
case $1 in
Expand Down

0 comments on commit f4e67cc

Please sign in to comment.