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 -N -r1.75.2.26 -r1.75.2.27 --- openacs-4/packages/xotcl-core/tcl/context-procs.tcl 22 Jan 2022 12:09:30 -0000 1.75.2.26 +++ openacs-4/packages/xotcl-core/tcl/context-procs.tcl 24 Jan 2022 18:23:01 -0000 1.75.2.27 @@ -175,7 +175,7 @@ Convenience routine for includelets. It combines the actual parameters from the call in the page (highest priority) with the values from the url (second priority) and the default - values from the signature + values from the signature. } { set source [expr {[info exists :__caller_parameters] ? [self] : [:info parent]}] 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 -N -r1.29.2.11 -r1.29.2.12 --- openacs-4/packages/xotcl-core/tcl/policy-procs.tcl 24 Jan 2022 16:31:24 -0000 1.29.2.11 +++ openacs-4/packages/xotcl-core/tcl/policy-procs.tcl 24 Jan 2022 18:23:01 -0000 1.29.2.12 @@ -97,14 +97,15 @@ Policy instproc get_permission {{-check_classes true} object method} { # ns_log notice "[self] [self proc] [self args] // object=$object" - set permission "" set o [self]::[namespace tail $object] set key require_permission($method) if {[::nsf::is object $o]} { if {[$o exists $key]} { set permission [$o set $key] } elseif {[$o exists default_permission]} { set permission [$o set default_permission] + } else { + set permission "" } } elseif {$check_classes} { # we have no object specific policy information, check the classes @@ -124,13 +125,19 @@ return $permission } - Policy ad_instproc check_permissions {-user_id -package_id {-link ""} object method} { + Policy ad_instproc check_permissions { + -user_id:integer + -package_id:integer + {-link ""} + object:object + method + } { - This method checks whether the current user is allowed - or not to invoke a method based on the given policy. - This method is purely checking and does not force logins - or other side effects. It can be safely used for example - to check whether links should be shown or not. + This method checks whether the current or specified user is + allowed to invoke a method based on the given policy. This + method is purely checking and does not force logins or other side + effects. It can be safely used for example to check whether links + should be shown or not. @see enforce_permissions @return 0 or 1 Index: openacs-4/packages/xotcl-core/tcl/test/xotcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/test/Attic/xotcl-test-procs.tcl,v diff -u -N -r1.1.2.15 -r1.1.2.16 --- openacs-4/packages/xotcl-core/tcl/test/xotcl-test-procs.tcl 16 Feb 2021 17:22:19 -0000 1.1.2.15 +++ openacs-4/packages/xotcl-core/tcl/test/xotcl-test-procs.tcl 24 Jan 2022 18:23:01 -0000 1.1.2.16 @@ -10,6 +10,7 @@ "::xo::db::Class proc get_instance_from_db" "::xo::db::DB-postgresql instproc get_value" + "::xo::db::select_driver" "::xo::db::Object instproc save" "::xo::db::Object instproc save_new" "::xo::db::Object instproc delete"