Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.42 -r1.43 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 7 Mar 2007 12:50:23 -0000 1.42 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 7 Mar 2007 21:54:22 -0000 1.43 @@ -793,11 +793,27 @@ Policy instproc check_privilege {privilege object method} { set allowed -1 ;# undecided + if {[acs_user::site_wide_admin_p]} { + return 1 + } switch $privilege { none {return 1} login {auth::require_login; return 1} + creator { + if {[$object exists creation_user]} { + auth::require_login + if {[$object set creation_user] == [::xo::cc user_id]} { + set allowed 1 + } else { + set allowed [::xo::cc permission -object_id [::xo::cc package_id] -privilege admin \ + -party_id [xo::cc user_id]] + } + } else { + set allowed 0 + } + } swa { - set allowed [acs_user::site_wide_admin_p] + #set allowed [acs_user::site_wide_admin_p] #if {!$allowed} { # ad_return_warning "Insufficient Permissions" \ # "Only side wide admins are allowed for this operation! ($object $method)" @@ -1001,8 +1017,8 @@ download {{package_id read}} } } + - } Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.34 -r1.35 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 7 Mar 2007 20:12:41 -0000 1.34 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 7 Mar 2007 21:54:22 -0000 1.35 @@ -61,9 +61,11 @@ set field_list [my field_list] if {[my show_page_order]} { set field_list [linsert $field_list 2 page_order] - set s [$data get_field_type page_order "" ""] - if {$s ne ""} { - my set f.page_order $page_order:$s + if {[$data istype ::xowiki::PageInstance]} { + set s [$data get_field_type page_order "" ""] + if {$s ne ""} { + my set f.page_order $page_order:$s + } } } if {$autoname} {