Index: openacs-4/packages/xotcl-core/tcl/context-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/context-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/xotcl-core/tcl/context-procs.tcl 21 Jan 2007 18:01:15 -0000 1.8 +++ openacs-4/packages/xotcl-core/tcl/context-procs.tcl 1 Feb 2007 09:00:35 -0000 1.9 @@ -246,12 +246,21 @@ call ::permission::permission_p but avoid multiple calls in the same session through caching in the connection context } { - #my log "--p [self args] [info exists party_id] " if {![info exists party_id]} { set party_id [my user_id] #my log "--p party_id $party_id" - #::xo::show_stack if {$party_id == 0} { + set key permission($object_id,$privilege,$party_id) + if {[my exists $key]} {return [my set $key]} + set granted [permission::permission_p -party_id $party_id \ + -object_id $object_id \ + -privilege $privilege] + if {$granted} { + my set $key $granted + return $granted + } + # The permission is not granted for the public. + # We force the user to login auth::require_login return 0 } Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v diff -u -r1.43 -r1.44 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 27 Jan 2007 16:33:16 -0000 1.43 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 1 Feb 2007 09:00:35 -0000 1.44 @@ -710,10 +710,12 @@ $__class folder_type -folder_id $parent_id register db_dml lock_objects "LOCK TABLE acs_objects IN SHARE ROW EXCLUSIVE MODE" set revision_id [db_nextval acs_object_id_seq] + if {$name eq ""} { # we have an anonymous item, use a unique value for the name set name $revision_id } + set item_id [db_string content_item__new \ [subst [[self class] set content_item__new]]]