]> git.plutz.net Git - shellwiki/commitdiff
user and acl awareness
authorPaul Hänsch <paul@plutz.net>
Tue, 17 May 2022 23:20:01 +0000 (01:20 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 17 May 2022 23:20:01 +0000 (01:20 +0200)
macros/attachments
macros/pagelist

index 0a49075a74afaa001de2eb0b1daeb118ce5c11fb..34a7bebc98b2552387366cb8b5876746b09c9f7e 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 . "$_EXEC/cgilite/cgilite.sh"
+. "$_EXEC/cgilite/users.sh"
+. "$_EXEC/acl.sh"
 . "$_EXEC/tools.sh"
 
 page="$1"
@@ -9,6 +11,8 @@ if [ "${page#/}" = "$page" ]; then
   page="$(PATH "${PATH_INFO}/$page")"
 fi
 
+acl_read "$page" || exit 0
+
 printf %s\\n '<ul class="macro attachment list">'
 
 for file in "$_EXEC/pages/$page/#attachments"/* "$_DATA/pages/$page/#attachments"/*; do
index e9f5a33e191be7ba9796e2aa8911cdccd6d1b5db..7c800418c41c02a259caab7bc7eeb79c14963e42 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 . "$_EXEC/cgilite/cgilite.sh"
+. "$_EXEC/cgilite/users.sh"
 . "$_EXEC/acl.sh"
 . "$_EXEC/tools.sh"