Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v diff -u -r1.88.2.15 -r1.88.2.16 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 27 Mar 2017 10:33:29 -0000 1.88.2.15 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 21 Apr 2017 14:22:45 -0000 1.88.2.16 @@ -83,7 +83,7 @@ # The "driverkey" indirection layer: # # Note that in the AOLserver config file, you may optionally add one -# entry for each database definining its "driver key". If you do NOT +# entry for each database defining its "driver key". If you do NOT # specify a driver key in the AOLserver config file, the appropriate # key will be determined for you by calling "ns_db driver" once on # startup for the first pool defined in each database. Therefore, Index: openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl 10 Sep 2015 08:21:55 -0000 1.8.2.1 +++ openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl 21 Apr 2017 14:22:45 -0000 1.8.2.2 @@ -670,7 +670,7 @@ # drop_while p xs returns the remaining portion of the list # span p xs = (takeWhile p xs, dropWhile p xs) # -# take_until p xs returns the list of elements upto and including the +# take_until p xs returns the list of elements up to and including the # first element of xs which satisfies p # # -------------------------------------------------------------------------------- @@ -702,7 +702,7 @@ list [take_while $p $xs] [drop_while $p $xs] } -ad_proc -public take_until {p xs} "returns the list of elements upto and including the +ad_proc -public take_until {p xs} "returns the list of elements up to and including the first element of xs which satisfies p" { set index 0 foreach x $xs { Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.36.2.10 -r1.36.2.11 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 28 Mar 2017 06:46:51 -0000 1.36.2.10 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 21 Apr 2017 14:22:45 -0000 1.36.2.11 @@ -573,7 +573,7 @@ [exec [apm_gzip_cmd] -d -q -c -S .apm $file_path | [apm_tar_cmd] tf - 2> [apm_dev_null]]] "\n"] apm_callback_and_log $callback "
[ns_quotehtml $errmsg]
template::data::validate::float
on this list implements the 'float' datatype.
-pattern
proc will include
+ If omitted together with -pattern
proc will include
every cookie.
@param pattern Cookies which name respects this pattern as in string match
- will be included. If omitted toghether with -cookie_names
proc
+ will be included. If omitted together with -cookie_names
proc
will include every cookie.
@return ns_set of headers containing received cookies
@@ -201,7 +201,7 @@
'curl', which wraps the command line utility (available on every
system with curl installed).
- @param force_ssl specifies wether we want to use SSL despite the
+ @param force_ssl specifies whether we want to use SSL despite the
url being in http:// form. Default behavior is to use SSL on
https:// urls only.
@@ -412,7 +412,7 @@
capable of receiving gzipped responses. If server complies to our
indication, the result will be automatically decompressed.
- @param force_ssl specifies wether we want to use SSL
+ @param force_ssl specifies whether we want to use SSL
despite the url being in http:// form. Default behavior is to use
SSL on https:// urls only.
@@ -526,7 +526,7 @@
receiving gzipped responses. If server complies to our
indication, the result will be automatically decompressed.
- @param force_ssl specifies wether we want to use SSL despite the
+ @param force_ssl specifies whether we want to use SSL despite the
url being in http:// form. Default behavior is to use SSL on
https:// urls only.
@@ -577,7 +577,8 @@
set urlvars($key) 1
}
- # Check wether we don't have multiple variable definition in url and payload
+ # Check whether we don't have multiple variable definition in url
+ # and payload.
foreach var [split $formvars &] {
set var [split $var =]
set key [lindex $var 0]
@@ -923,7 +924,7 @@
receiving gzipped responses. If server complies to our
indication, the result will be automatically decompressed.
- @param force_ssl specifies wether we want to use SSL despite the
+ @param force_ssl specifies whether we want to use SSL despite the
url being in http:// form. Default behavior is to use SSL on
https:// urls only.
@@ -1101,7 +1102,7 @@
receiving gzipped responses. If server complies to our
indication, the result will be automatically decompressed.
- @param force_ssl specifies wether we want to use SSL despite the
+ @param force_ssl specifies whether we want to use SSL despite the
url being in http:// form. Default behavior is to use SSL on
https:// urls only.
@@ -1238,7 +1239,7 @@
receiving gzipped responses. If server complies to our
indication, the result will be automatically decompressed.
- @param force_ssl specifies wether we want to use SSL despite the
+ @param force_ssl specifies whether we want to use SSL despite the
url being in http:// form. Default behavior is to use SSL on
https:// urls only.
@@ -1281,7 +1282,7 @@
return -code error "${this_proc}: Invalid url: $url"
}
- # Check wether we will use ssl or not
+ # Check whether we will use ssl or not
if {$force_ssl_p || [string match "https://*" $url]} {
set http_api [util::http::native_https_api]
if {$http_api eq ""} {
@@ -1295,7 +1296,7 @@
set headers [ns_set create headers]
}
- # Determine wether we want to gzip the request.
+ # Determine whether we want to gzip the request.
# Servers uncapable of treating such requests will likely throw an error...
set req_content_encoding [ns_set iget $headers "content-encoding"]
if {$req_content_encoding ne ""} {
@@ -1602,8 +1603,8 @@
set headers [ns_set create headers]
}
- # Determine wether we want to gzip the request.
- # Default is no, can't know wether the server accepts it.
+ # Determine whether we want to gzip the request.
+ # Default is no, can't know whether the server accepts it.
# We could at the http api level (TODO?)
set req_content_encoding [ns_set iget $headers "content-encoding"]
if {$req_content_encoding ne ""} {
@@ -1712,7 +1713,7 @@
}
lappend cmd --data-binary "@${body_file}"
- # Return response code toghether with webpage
+ # Return response code together with webpage
lappend cmd -w " %\{http_code\}"
# Add headers to the command line
@@ -1990,7 +1991,7 @@
set rfd [lindex $http 0]
set wfd [lindex $http 1]
- #headers necesary for a post and the form variables
+ #headers necessary for a post and the form variables
_ns_http_puts $timeout $wfd "Content-type: application/x-www-form-urlencoded \r"
_ns_http_puts $timeout $wfd "Content-length: [string length $formvars]\r"
@@ -2134,7 +2135,7 @@
If you specify -file then -filename is optional - (it can be infered from the name of the file). However, if you + (it can be inferred from the name of the file). However, if you specify -data then it is mandatory.
@@ -2151,7 +2152,7 @@
Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.78.2.51 -r1.78.2.52 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 15 Apr 2017 10:12:03 -0000 1.78.2.51 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 21 Apr 2017 14:22:45 -0000 1.78.2.52 @@ -2024,7 +2024,7 @@ # set driverInfo [util_driver_info] set driverHostName [dict get $driverInfo hostname] - if {$hostName eq $driverHostName || $hostName in [ns_addrbyhost -all $driverHostName]} { + if {$hostName eq $driverHostName || $hostName in [ns_ -all $driverHostName]} { # # port is currently ignored # @@ -2287,7 +2287,7 @@ font-src form-action frame-src - frome-ancestors + frame-ancestors img-src media-src object-src Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -r1.36.2.35 -r1.36.2.36 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 14 Apr 2017 09:01:45 -0000 1.36.2.35 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 21 Apr 2017 14:22:46 -0000 1.36.2.36 @@ -769,7 +769,7 @@ if { ![info exists validate] } { set validate [list] - } + }d set validate_len [llength $validate] for { set i 0 } { $i < $validate_len } { incr i } { Index: openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 11 Apr 2016 14:27:31 -0000 1.1.2.3 +++ openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 21 Apr 2017 14:22:46 -0000 1.1.2.4 @@ -1,10 +1,10 @@ # -# Add Tcl traces for asserted tcl commands. +# Add Tcl traces for asserted Tcl commands. # # Add the traces only, when the functions are active (i.e. the -# controling package parameter has not the default value), because +# controlling package parameter has not the default value), because # adding the traces has performance impact on potentially frequently -# called tcl commands (such as e.g. ns_log) +# called Tcl commands (such as e.g. ns_log) # # Therefore, activating/deactivating requires a server restart. # Index: openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl,v diff -u -r1.67.2.25 -r1.67.2.26 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 13 Feb 2017 13:44:50 -0000 1.67.2.25 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 21 Apr 2017 14:22:46 -0000 1.67.2.26 @@ -69,7 +69,7 @@ # email links have the form xxx@xxx.xxx # # JCD: don't treat things =xxx@xxx.xxx as email since most - # common occurance seems to be in urls (although VPATH bounce + # common occurrence seems to be in urls (although VPATH bounce # emails like bounce-user=domain.com@sourcehost.com will then # not work correctly). Another tricky case is # http://www.postgresql.org/message-id/20060329203545.M43728@narrowpathinc.com @@ -724,11 +724,15 @@ break } - # This regexp matches an attribute name and an equal sign, if present. - # Also eats whitespace before or after. - # The \A corresponds to ^, except it matches the position we're starting from, not the start of the string + # This regexp matches an attribute name and an equal sign, if + # present. Also eats whitespace before or after. The \A + # corresponds to ^, except it matches the position we're + # starting from, not the start of the string. if { ![regexp -indices -start $i {\A\s*([^\s=>]+)\s*(=?)\s*} $html match attr_name_idx equal_sign_idx] } { - # Apparantly, there's no attribute name here. Let's eat all whitespace and lonely equal signs. + # + # Apparently, there's no attribute name here. + # Let's eat all whitespace and lonely equal signs. + # regexp -indices -start $i {\A[\s=]*} $html match set i [expr { [lindex $match 1] + 1 }] } { @@ -828,7 +832,7 @@ incr i if { ![regexp -indices -start $i {\A/?([-_a-zA-Z0-9]+)\s*} $html match name_idx] } { - # The tag-opener isn't followed by USASCII letters (with or without optional inital slash) + # The tag-opener isn't followed by USASCII letters (with or without optional initial slash) # Not considered a tag. Shouldn't do any harm in browsers. # (Tested with digits, with A syntax, with whitespace) } else { @@ -1060,7 +1064,7 @@ @param fix When parsing fails on markup as it is, try to fix it by, for example, closing unclosed tags or normalizing attribute specification. This operation will remove most of - plain whitespace into text content of original HTML, toghether + plain whitespace into text content of original HTML, together with every comment and the eventually present DOCTYPE declaration. @@ -1372,8 +1376,9 @@ set last_tag_end [incr i] continue } elseif {[string match "!--*" [string range $html $i+1 end]]} { - # handle HTML comments, I can't beleive noone noticed this before. - # this code maybe not be elegant but it works + # Handle HTML comments, I can't believe no one noticed + # this before. This code maybe not be elegant but it + # works. # find the closing comment tag. set comment_idx [string first "-->" $html $i] @@ -2175,7 +2180,7 @@ Should always be called as string_truncate [-flags ...] -- string since otherwise strings which start with a - will treated as switches, and will cause an error. - @param len The lenght to truncate to. If zero, no truncation will occur. + @param len The length to truncate to. If zero, no truncation will occur. @param ellipsis This will get put at the end of the truncated string, if the string was truncated. However, this counts towards the total string length, so that the returned string Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.140.2.71 -r1.140.2.72 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 15 Apr 2017 09:52:46 -0000 1.140.2.71 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 21 Apr 2017 14:22:46 -0000 1.140.2.72 @@ -276,7 +276,7 @@ } { This proc is used for pages using double click protection. table_name is table_name for which we are checking whether the double click - occured. id_column_name is the name of the id table + occurred. id_column_name is the name of the id table column. generated_id is the generated id, which is supposed to have been generated on the previous page. return_url is url to which this procedure will return redirect in the case of successful insertion in @@ -1129,7 +1129,7 @@ You can append :multiple to the name of a variable. In this case, the value will be treated as a list, and each of the elements output separately.
- export_vars is now the prefered interface. + export_vars is now the preferred interface.
Example usage: [export_vars -form -sign {foo bar:multiple baz}]
@@ -1174,7 +1174,7 @@
generally not be used. It's much better to explicitly name
the variables you want to export.
- export_vars is now the prefered interface.
+ export_vars is now the preferred interface.
@see export_vars
} {
@@ -1200,7 +1200,7 @@
format = url, a url parameter string will be returned. If format = form, a
block of hidden form fragments will be returned.
- export_vars is now the prefered interface.
+ export_vars is now the preferred interface.
@param format either url or form
@param exclusion_list list of fields to exclude
@@ -1241,7 +1241,7 @@
-sign:boolean
args
} {
- export_vars is now the prefered interface.
+ export_vars is now the preferred interface.
Returns a string of key=value pairs suitable for inclusion in a
URL; you can pass it any number of variables as arguments. If any are
@@ -1312,7 +1312,7 @@
ad_proc -public export_entire_form_as_url_vars {
{vars_to_passthrough ""}
} {
- export_vars is now the prefered interface.
+ export_vars is now the preferred interface.
Returns a URL parameter string of name-value pairs of all the form
parameters passed to this page. If vars_to_passthrough is given, it
@@ -4503,7 +4503,7 @@
ad_proc -public util::roll_server_log {} {
Invoke the AOLserver ns_logroll command with some bookend log records. This rolls the error log, not the access log.
} {
- # This param controlls how many backups of the server log to keep,
+ # This param controls how many backups of the server log to keep,
ns_config -int "ns/parameters" logmaxbackup 10
ns_log Notice "util::roll_server_log: Rolling the server log now..."
ns_logroll
@@ -4662,8 +4662,9 @@
@param command A list of arguments to pass to exec
@param result_var Variable name in caller's scope to set the result in
- @return 0 or 1. 0 if no error, 1 if an error occured. If an error occured
- the error message will be put into result_var in the caller's scope.
+ @return 0 or 1. 0 if no error, 1 if an error occurred. If an error
+ occurred the error message will be put into result_var in the
+ caller's scope.
@author Dave Bauer
@creation-date 2008-01-28
@@ -4730,7 +4731,7 @@
# failed. The error code is in $errName, and a
# human-readable message is in $msg.
ns_log notice "util::catch_exec: posix $errName $msg $result"
- set result "an error occured $errName \"$msg\""
+ set result "an error occurred $errName \"$msg\""
return 1
}
Index: openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl,v
diff -u -r1.4.12.1 -r1.4.12.2
--- openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl 10 Sep 2015 08:22:01 -0000 1.4.12.1
+++ openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl 21 Apr 2017 14:22:46 -0000 1.4.12.2
@@ -26,7 +26,7 @@
}
ad_proc -private whos_online::flush {} {
- Removing all user_ids from the last_hit (nsv_set) wich have a time Stamp older than
+ Removing all user_ids from the last_hit (nsv_set) which have a time Stamp older than
the number of seconds indicated by the proc whos_online::interval.
@author Bjoern Kiesbye
@@ -127,7 +127,7 @@
ad_proc -public whos_online::user_ids {
{-all:boolean}
} {
- This function returns a list of user_ids from users wich have requested a page
+ This function returns a list of user_ids from users which have requested a page
from this Server in the last 10 min.And aren't set to invisible.
@param all Set this flag if you want to include invisible users.
@@ -191,7 +191,7 @@
}
ad_proc -public whos_online::all_invisible_user_ids {} {
- This function returns a list with all user_ids wich are set to invisible
+ This function returns a list with all user_ids which are set to invisible
@author Bjoern Kiesbye
} {
Index: openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl,v
diff -u -r1.4.2.1 -r1.4.2.2
--- openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 10 Sep 2015 08:22:01 -0000 1.4.2.1
+++ openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 21 Apr 2017 14:22:46 -0000 1.4.2.2
@@ -928,7 +928,7 @@
# A syntax tree is constructed.
# A transition table is built next.
#
-# This is going to need alot of work!
+# This is going to need a lot of work!
#
# Arguments:
# state state array variable
Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 10 Sep 2015 08:22:02 -0000 1.3.2.1
+++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 21 Apr 2017 14:22:46 -0000 1.3.2.2
@@ -64,8 +64,8 @@
aa_log "Package to be instantiated: $package_key"
aa_log "Instance name to be added: $instance_name"
- set error_ocurred [catch {set package_id [apm_package_instance_new -package_key $package_key -instance_name $instance_name ]} err_men]
- aa_log "Error Message $error_ocurred: $err_men "
+ set error_occurred [catch {set package_id [apm_package_instance_new -package_key $package_key -instance_name $instance_name ]} err_men]
+ aa_log "Error Message $error_occurred: $err_men "
aa_true "Setting the new instance succeeded" [expr {[info exists package_id] && $package_id ne ""}]
Index: openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl,v
diff -u -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 10 Sep 2015 08:22:02 -0000 1.5.2.1
+++ openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 21 Apr 2017 14:22:46 -0000 1.5.2.2
@@ -1,5 +1,5 @@
ad_library {
- Tests for applicaiton data links
+ Tests for application data links.
}
aa_register_case -cats api data_links_scan_links {
Index: openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl,v
diff -u -r1.2.14.1 -r1.2.14.2
--- openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl 10 Sep 2015 08:22:03 -0000 1.2.14.1
+++ openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl 21 Apr 2017 14:22:46 -0000 1.2.14.2
@@ -36,7 +36,7 @@
aa_log "checking if the proc is cached"
set success_p [util_memoize_cached_p {memoizing_procs_test::return_string -name "foobar"}]
- aa_equals "proc was cached succesful" $success_p 1
+ aa_equals "proc was cached successful" $success_p 1
}
aa_register_case -cats {api smoke} ad_proc_flush {
@@ -48,7 +48,7 @@
aa_log "flushing"
util_memoize_flush_regexp {return_upper_case_text}
set success_p [util_memoize_cached_p {memoizing_procs_test::return_upper_case_text -txt "foobar"}]
- aa_equals "proc was flushed succesful" $success_p 0
+ aa_equals "proc was flushed successful" $success_p 0
}
Index: openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl,v
diff -u -r1.2.12.1 -r1.2.12.2
--- openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 10 Sep 2015 08:22:04 -0000 1.2.12.1
+++ openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 21 Apr 2017 14:22:46 -0000 1.2.12.2
@@ -15,66 +15,67 @@
Test for Permission Procedures of grant and revoke.
} {
- #we get an user_id as party_id.
+ # We get an user_id as party_id.
set user_id [db_nextval acs_object_id_seq]
aa_run_with_teardown -rollback -test_code {
- #Create the user
+ # Create the user
array set user_info [twt::user::create -user_id $user_id]
- #Create and mount new subsite to test the permissions on this instance
+ # Create and mount new subsite to test the permissions on this
+ # instance.
set site_name [ad_generate_random_string]
set new_package_id [site_node::instantiate_and_mount \
-node_name $site_name \
-package_key acs-subsite]
- #Grant privileges of admin,read,write and create, after check
- #this ones, after revoke this ones.
+ # Grant privileges of admin,read,write and create, after check
+ # this ones, after revoke this ones.
- #Grant admin privilege
+ # Grant admin privilege
permission::grant -party_id $user_id -object_id $new_package_id -privilege "admin"
- #Verifying the admin privilege on the user
+ # Verifying the admin privilege on the user
aa_true "testing admin privilige" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "admin"] == 1}]
- #Revoking admin privilege
+ # Revoking admin privilege
permission::revoke -party_id $user_id -object_id $new_package_id -privilege "admin"
aa_true "testing if admin privilige was revoked" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "admin"] == 0}]
- #Grant read privilege
+ # Grant read privilege
permission::grant -party_id $user_id -object_id $new_package_id -privilege "read"
- #Verifying the read privilege on the user
+ # Verifying the read privilege on the user
aa_true "testing read permissions" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "read" ] == 1}]
- #Revoking read privilege
+ # Revoking read privilege
permission::revoke -party_id $user_id -object_id $new_package_id -privilege "read"
- #We tested with a query because we have problems with inherit
+ # We tested with a query because we have problems with inherit
aa_true "testing if read privilige was revoked" \
[expr {[db_string test_read "select 1 from acs_permissions where object_id = :new_package_id and grantee_id = :user_id" -default 0] == 0}]
- #Grant write privilege
+ # Grant write privilege
permission::grant -party_id $user_id -object_id $new_package_id -privilege "write"
- #Verifying the write privilege on the user
+ # Verifying the write privilege on the user
aa_true "testing write permissions" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "write" ] == 1}]
- #Revoking write privilege
+ # Revoking write privilege
permission::revoke -party_id $user_id -object_id $new_package_id -privilege "write"
aa_true "testing if write permissions was revoked" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "write" ] == 0}]
- #Grant create privilege
+ # Grant create privilege
permission::grant -party_id $user_id -object_id $new_package_id -privilege "create"
- #Verifying the create privelege on the user
+ # Verifying the create privilege on the user
aa_true "testing create permissions" \
- [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 1}]
- #Revoking create privilege
- permission::revoke -party_id $user_id -object_id $new_package_id -privilege "create"
- aa_true "testing if create privileges was revoked" \
- [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 0}]
+ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 1}]
+ # Revoking create privilege
+ permission::revoke -party_id $user_id -object_id $new_package_id -privilege "create"
+ aa_true "testing if create privileges was revoked" \
+ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 0}]
- #Grant delete privilege
+ # Grant delete privilege
permission::grant -party_id $user_id -object_id $new_package_id -privilege "delete"
- #Verifying the delete privilege on the user
+ # Verifying the delete privilege on the user
aa_true "testing delete permissions" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "delete" ] == 1}]
- #Revoking delete privilege
+ # Revoking delete privilege
permission::revoke -party_id $user_id -object_id $new_package_id -privilege "delete"
aa_true "testing if delete permissions was revoked" \
[expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "delete" ] == 0}]
@@ -86,13 +87,13 @@
Test for Permission Procedures of permission_p
} {
- #we get an user_id as party_id.
+ # We get an user_id as party_id.
set user_id [db_nextval acs_object_id_seq]
aa_run_with_teardown -rollback -test_code {
- #Create the user
+ # Create the user
array set user_info [twt::user::create -user_id $user_id]
- #Create and mount new subsite to test the permissions on this
- # instance
+ # Create and mount new subsite to test the permissions on this
+ # instance
set site_name [ad_generate_random_string]
set new_package_id [site_node::instantiate_and_mount \
-node_name $site_name \