Index: openacs-4/packages/xotcl-core/tcl/policy-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/policy-procs.tcl,v diff -u -r1.10.2.2 -r1.10.2.3 --- openacs-4/packages/xotcl-core/tcl/policy-procs.tcl 1 Aug 2007 21:39:32 -0000 1.10.2.2 +++ openacs-4/packages/xotcl-core/tcl/policy-procs.tcl 2 Aug 2007 12:12:13 -0000 1.10.2.3 @@ -17,10 +17,11 @@ Policy instproc check_privilege {{-login true} -user_id -package_id privilege object method} { set allowed -1 ;# undecided - if {[acs_user::site_wide_admin_p -user_id $user_id]} { + if {[acs_user::site_wide_admin_p -user_id $user_id] && $privilege ne "nobody"} { return 1 } switch $privilege { + nobody {return 0} none {return 1} login { if {$login} { 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.77.2.2 -r1.77.2.3 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 1 Aug 2007 21:39:24 -0000 1.77.2.2 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 2 Aug 2007 12:12:13 -0000 1.77.2.3 @@ -916,7 +916,11 @@ google-sitemap none google-sitemapindex none delete {{id admin}} - edit-new {{{has_class ::xowiki::Object} id admin} {id create}} + edit-new { + {{has_class ::xowiki::Object} id admin} + {{has_class ::xowiki::FormPage} nobody} + {id create} + } } Class Page -array set require_permission { @@ -956,7 +960,11 @@ google-sitemap none google-sitemapindex none delete swa - edit-new {{{has_class ::xowiki::Object} swa} {id create}} + edit-new { + {{has_class ::xowiki::Object} swa} + {{has_class ::xowiki::FormPage} nobody} + {id create} + } } Class Page -array set require_permission { @@ -991,7 +999,11 @@ google-sitemap none google-sitemapindex none delete swa - edit-new {{{has_class ::xowiki::Object} swa} {id create}} + edit-new { + {{has_class ::xowiki::Object} swa} + {{has_class ::xowiki::FormPage} nobody} + {id create} + } } Class Page -array set require_permission { @@ -1014,11 +1026,11 @@ } } - Policy policy4 -contains { - ::xotcl::Object function -array set require_permission { - f none - } -set default_permission login - } + #Policy policy4 -contains { + # ::xotcl::Object function -array set require_permission { + # f none + # } -set default_permission login + #} #my log "--set granted [policy4 check_permissions -user_id 0 -package_id 0 function f]" } Index: openacs-4/packages/xowiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v diff -u -r1.18.2.2 -r1.18.2.3 --- openacs-4/packages/xowiki/www/admin/index.tcl 1 Aug 2007 21:39:25 -0000 1.18.2.2 +++ openacs-4/packages/xowiki/www/admin/index.tcl 2 Aug 2007 12:12:13 -0000 1.18.2.3 @@ -37,12 +37,12 @@ set base [::$package_id package_url] foreach object_type $object_types { set return_url [export_vars -base ${base}admin {object_type}] + set add_title "" + set add_href "" if {[catch {set n [db_list count [$object_type instance_select_query \ -folder_id [::$package_id set folder_id] \ -count 1 -with_subtypes false]]}]} { set n - - set add_title "" - set add_href "" set delete_title "Delete all such items of this instance" } else { set add_title [_ xotcl-core.add [list type [$object_type pretty_name]]] Index: openacs-4/packages/xowiki/www/admin/list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/list.tcl,v diff -u -r1.15.2.2 -r1.15.2.3 --- openacs-4/packages/xowiki/www/admin/list.tcl 1 Aug 2007 21:39:25 -0000 1.15.2.2 +++ openacs-4/packages/xowiki/www/admin/list.tcl 2 Aug 2007 12:12:13 -0000 1.15.2.3 @@ -39,10 +39,12 @@ set actions "" foreach type $object_types { + set link [$package_id make_link $package_id edit-new {object_type $type} return_url autoname] + if {$link eq ""} continue append actions [subst { Action new \ -label "[_ xotcl-core.add [list type [$type pretty_name]]]" \ - -url [export_vars -base [::$package_id package_url] {{edit-new 1} {object_type $type} return_url}] \ + -url $link \ -tooltip "[_ xotcl-core.add_long [list type [$type pretty_name]]]" }] }