Index: openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 5 Jul 2018 09:49:33 -0000 1.14 +++ openacs-4/packages/acs-subsite/www/shared/portrait-bits.tcl 13 Nov 2018 18:22:23 -0000 1.15 @@ -9,6 +9,9 @@ {size ""} } +# Show the portrait only to authenticated users +auth::require_login + # # The size info is a valid geometry as provided for image magicks # "convert". We provide here a sample list of valid sizes @@ -37,14 +40,14 @@ # we provide cached thumbnails, which use in their cache # key the revision id. # - + set folder [acs_root_dir]/portrait-thumbnails if {![file exists $folder]} { file mkdir $folder } set filename $folder/$itemInfo(revision_id).$size - + if {![file exists $filename]} { switch -- $itemInfo(storage_type) { "file" { @@ -89,6 +92,9 @@ ns_returnnotfound } } +} else { + # Return default avatar image + ns_returnfile 200 image/png [acs_root_dir]/packages/acs-subsite/www/shared/avatar-x50.png } # Local variables: