Index: openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl 10 Sep 2015 08:21:09 -0000 1.5.2.1 +++ openacs-4/packages/acs-admin/www/users/modify-admin-privileges.tcl 8 Oct 2015 19:28:03 -0000 1.5.2.2 @@ -5,21 +5,17 @@ @cvs-id $Id$ } { - user_id:naturalnum,notnull - action:notnull - confirmed_p:boolean,optional + user_id:naturalnum,notnull,verify + action:notnull,verify + {confirmed_p:boolean 0} } -set confirmed_url "/acs-admin/users/modify-admin-privileges?user_id=$user_id&action=$action&confirmed_p=1" +set confirmed_url [export_vars -base /acs-admin/users/modify-admin-privileges { + user_id:sign(max_age=60) action:sign {confirmed_p 1}}] +set return_url [export_vars -base /acs-admin/users/one {user_id}] -set return_url "/acs-admin/users/one?user_id=$user_id" - set context [list [list "./" "Users"] "Modify privileges"] -if {![info exists confirmed_p]} { - set confirmed_p 0 -} - if {$confirmed_p} { if {"grant" eq $action} { permission::grant -object_id [acs_magic_object "security_context_root"] -party_id $user_id -privilege "admin" Index: openacs-4/packages/acs-admin/www/users/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/one.adp,v diff -u -r1.25 -r1.25.2.1 --- openacs-4/packages/acs-admin/www/users/one.adp 14 Jul 2015 22:26:55 -0000 1.25 +++ openacs-4/packages/acs-admin/www/users/one.adp 8 Oct 2015 19:28:03 -0000 1.25.2.1 @@ -7,21 +7,20 @@ - + -

WARNING: This user is a site-wide administrator (maybe the only one). Deleting or banning this user may mean you will be unable to administrate the site. @@ -41,7 +40,7 @@

  • @direct_group_membership.group_name@ - (Remove)
  • + (Remove)

@@ -72,18 +71,18 @@

Index: openacs-4/packages/acs-admin/www/users/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/one.tcl,v diff -u -r1.17.2.1 -r1.17.2.2 --- openacs-4/packages/acs-admin/www/users/one.tcl 10 Sep 2015 08:21:09 -0000 1.17.2.1 +++ openacs-4/packages/acs-admin/www/users/one.tcl 8 Oct 2015 19:28:03 -0000 1.17.2.2 @@ -34,8 +34,14 @@ set warning_p 0 set ad_conn_user_id [ad_conn user_id] +# +# Define the url for switching side-wide admin priviledges with a timeout of 60 seconds +# if { $site_wide_admin_p } { + set modify_admin_url [export_vars -base modify-admin-privileges {user_id:sign(max_age=60) {action:sign revoke}}] set warning_p 1 +} else { + set modify_admin_url [export_vars -base modify-admin-privileges {user_id:sign(max_age=60) {action:sign grant}}] }