acl_collection=''
acl_collect(){
- local path="${1:-${PATH_INFO}}"
+ local path="$1"
# Get directory part of PATH_INFO
local path="${path%/*}/./"
local pagefile head acl
- if [ "$acl_cachepath" = "$path" ]; then
- printf '%s\n' "$ACL_OVERRIDE" "$acl_collection" "$ACL_DEFAULT"
- return 0
- else
- acl_cachepath="$path"
- acl_collection=''
- fi
-
printf '%s\n' "$ACL_OVERRIDE"
while :; do
' <"$pagefile")"
printf %s\\n "${acl}"
- acl_collection="${acl_collection}${acl}${BR}"
done
printf '%s\n' "$ACL_DEFAULT"
local page="${1:-${PATH_INFO}}"
local acl
+ if [ "$acl_cachepath" != "$page" ]; then
+ acl_cachepath="$page"
+ acl_collection="$(acl_collect "$page")"
+ fi
+
while read -r acl; do
case ${acl##*:} in
read|*,read,*|read,*|*,read)
"+All:read") return 0;;
"-All:read") return 1;;
esac
- done <<-EOF
- $(acl_collect "$page")
+ done <<-EOF
+ ${acl_collection}
EOF
return 1
}
local page="${1:-${PATH_INFO}}"
local acl
+ if [ "$acl_cachepath" != "$page" ]; then
+ acl_cachepath="$page"
+ acl_collection="$(acl_collect "$page")"
+ fi
+
while read -r acl; do
case ${acl##*:} in
write|*,write,*|write,*|*,write)
"-All:write") return 1;;
esac
done <<-EOF
- $(acl_collect "$page")
+ ${acl_collection}
EOF
return 1
}