Index: openacs-4/packages/acs-authentication/lib/search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/lib/search.tcl,v
diff -u -r1.10 -r1.10.2.1
--- openacs-4/packages/acs-authentication/lib/search.tcl 27 Jul 2018 08:54:02 -0000 1.10
+++ openacs-4/packages/acs-authentication/lib/search.tcl 10 Apr 2019 21:05:36 -0000 1.10.2.1
@@ -1,8 +1,8 @@
ad_page_contract {
Includable page to search users in any authority
-
+
To grant permission on an object
- Including page can pass in
+ Including page can pass in
add_permissions (list of Label, URL)
object_id
privilege
@@ -20,15 +20,14 @@
orderby:token,optional
}
-set authority_options [auth::authority::get_authority_options]
-set default_authority_id [lindex $authority_options 0 1]
+set default_authority_id [auth::authority::get]
if {$authority_id eq ""} {
set authority_id $default_authority_id
}
if {![info exists rel_type] || $rel_type eq ""} {
set rel_type membership_rel
-}
+}
if {![info exists package_id] || $package_id eq ""} {
set package_id [ad_conn subsite_id]
}
@@ -42,16 +41,16 @@
# we need a base url for adding a user to the site (main subsite or dotlrn, etc...)
if {[info exists add_to_main_site]} {
foreach elm $add_to_main_site {
- lappend bulk_actions $elm
+ lappend bulk_actions $elm
}
}
# we need a base url for adding a user to a specific community (subsite or dotlrn class instance etc...) (optional)
if {[info exists add_to_subsite]} {
foreach elm $add_to_subsite {
- lappend bulk_actions $elm
+ lappend bulk_actions $elm
}
-}
+}
if {[info exists add_to_subsite] && [llength $add_to_subsite]} {
set add_user_url [lindex $add_to_subsite 1]
set add_user_label [lindex $add_to_subsite 0]
@@ -87,27 +86,27 @@
-filters {search_text {} authority_id {} object_id {}} \
-elements [list \
checkbox {
- display_template {}} \
- first [list label "First Name" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
- last [list label "Last Name" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
- username [list label "Username" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
- email {label "Email"} \
- auth_status { label "Status" } \
- actions [list label "Actions" display_template [subst {
- $add_user_label
- }]] \
- extra_attributes {label "Extra Attributes"} \
- user_id [list hide_p [expr {!$admin_p}] label "" display_template [subst {
- User Admin Page
- }]] \
- ] -bulk_actions $bulk_actions \
+ display_template {}} \
+ first [list label "First Name" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
+ last [list label "Last Name" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
+ username [list label "Username" link_url_eval "\[export_vars -base \"$member_url\" {user_id} \]"] \
+ email {label "Email"} \
+ auth_status { label "Status" } \
+ actions [list label "Actions" display_template [subst {
+ $add_user_label
+ }]] \
+ extra_attributes {label "Extra Attributes"} \
+ user_id [list hide_p [expr {!$admin_p}] label "" display_template [subst {
+ User Admin Page
+ }]] \
+ ] -bulk_actions $bulk_actions \
-orderby {
- first {orderby first_names}
- last {orderby last_name}
- username {orderby username}
- email {orderby email}
- auth_status {orderby auth_status}
+ first {orderby first_names}
+ last {orderby last_name}
+ username {orderby username}
+ email {orderby email}
+ auth_status {orderby auth_status}
}
template::multirow create authorities authority_id pretty_name local_authority_p search_url form_include
@@ -116,22 +115,22 @@
set this_authority_id [lindex $option_list 1]
set local_authority_p [string match $this_authority_id [auth::authority::local]]
if {$local_authority_p} {
- set local_authority_id $this_authority_id
- set form_include /packages/acs-authentication/lib/local-search
+ set local_authority_id $this_authority_id
+ set form_include /packages/acs-authentication/lib/local-search
} else {
- set form_include [acs_sc::invoke \
- -impl_id [auth::authority::get_element -authority_id $this_authority_id -element search_impl_id] \
- -operation FormInclude]
+ set form_include [acs_sc::invoke \
+ -impl_id [auth::authority::get_element -authority_id $this_authority_id -element search_impl_id] \
+ -operation FormInclude]
}
if {$this_authority_id eq $selected_authority_id} {
- set selected_form_include $form_include
+ set selected_form_include $form_include
}
template::multirow append authorities \
- $this_authority_id \
- [lindex $option_list 0] \
- $local_authority_p \
- [export_vars -base [ad_conn url] -no_empty {{authority_id $this_authority_id} search_text object_id}] \
- $form_include
+ $this_authority_id \
+ [lindex $option_list 0] \
+ $local_authority_p \
+ [export_vars -base [ad_conn url] -no_empty {{authority_id $this_authority_id} search_text object_id}] \
+ $form_include
}
#template::multirow sort authorities -decreasing authority_id