Index: openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl,v diff -u -N -r1.43 -r1.44 --- openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl 26 Jun 2018 12:46:47 -0000 1.43 +++ openacs-4/packages/acs-tcl/tcl/acs-permissions-procs.tcl 27 Jun 2018 08:15:29 -0000 1.44 @@ -356,12 +356,10 @@ @see permission::permission_p } { - # cache is not enabled, exit immediately - if {[catch {ns_cache_flush permission_cache NOTHING}]} { + if {![info exists ::permission::cache_created]} { return - } - - if {[info exists party_id] && [info exists object_id] && [info exists privilege]} { + + } elseif {[info exists party_id] && [info exists object_id] && [info exists privilege]} { # # All three attributes are provided # @@ -428,13 +426,16 @@ @see permission::permission_p } { - if {[info exists party_id] && [info exists object_id] && [info exists privilege]} { + if {![info exists ::permission::cache_created]} { + return + + } elseif {[info exists party_id] && [info exists object_id] && [info exists privilege]} { # # All three attributes are provided # util_memoize_flush [list permission::permission_p_not_cached -party_id $party_id -object_id $object_id -privilege $privilege] - } else {[info exists party_id] } { + } elseif {[info exists party_id] } { # # At least the party_id is provided #