Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -N -r1.116 -r1.117
--- openacs-4/packages/xowiki/xowiki.info 23 Apr 2009 10:18:57 -0000 1.116
+++ openacs-4/packages/xowiki/xowiki.info 30 Apr 2009 07:38:50 -0000 1.117
@@ -10,11 +10,11 @@
t
xowiki
-
+
Gustaf Neumann
A more generic xotcl-based wikis example with object types
and subtypes based on the content repository (with category support)
- 2009-04-23
+ 2009-04-30
Gustaf Neumann, WU Wien
<pre>
XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of
@@ -56,12 +56,12 @@
BSD-Style
0
-
+
-
+
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 -N -r1.173 -r1.174
--- openacs-4/packages/xowiki/tcl/package-procs.tcl 28 Apr 2009 07:42:58 -0000 1.173
+++ openacs-4/packages/xowiki/tcl/package-procs.tcl 30 Apr 2009 07:38:50 -0000 1.174
@@ -1610,6 +1610,12 @@
create-or-use {{item_id write}}
list {{item_id read}}
}
+# Class FormPage -array set require_permission {
+# view {
+# {{is_true {_creation_user == @current_user@}} item_id read}
+# swa
+# }
+# }
}
#Policy policy4 -contains {
Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -N -r1.355 -r1.356
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 28 Apr 2009 11:14:29 -0000 1.355
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 30 Apr 2009 07:38:50 -0000 1.356
@@ -2374,6 +2374,10 @@
return $items
}
+ #
+ # begin property management
+ #
+
FormPage instproc property_key {name} {
if {[regexp {^_([^_].*)$} $name _ varname]} {
return $varname
@@ -2423,6 +2427,28 @@
return [$page property $name $default]
}
+ FormPage instproc condition=is_true {query_context value} {
+ #
+ # This condition maybe called from the policy rules.
+ # The passed value is a tuple of the form
+ # {property-name operator property-value}
+ #
+ foreach {property_name op property_value} $value break
+ if {![info exists property_value]} {return 0}
+
+ if {$property_value eq "@current_user@"} {
+ set property_value [$query_context get_user_id]
+ } elseif {$property_value eq "\\@current_user@"} {
+ set property_value "@current_user@"
+ }
+ ns_log notice "check $property_name $op $property_value => [expr [my property $property_name] $op $property_value]"
+ return [expr [my property $property_name] $op $property_value]
+ }
+
+ #
+ # end property management
+ #
+
FormPage instproc set_publish_status {value} {
if {[lsearch -exact [list production ready] $value] == -1} {
error "invalid value '$value'; use 'production' or 'ready'"