From 9051d3a5f3dcb4a9cd995e772ed4e5377088e3f2 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sat, 22 Jan 2011 23:11:07 -0500 Subject: proper check of permissions for hide unhide groups Ignore-this: 4d02243a67f9a5cb5b6d543d7913a138 darcs-hash:20110123041107-067c0-db68de5af08458fa87466080ef0ca635a43bf1fc.gz --- GradeBook.tcl | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'GradeBook.tcl') diff --git a/GradeBook.tcl b/GradeBook.tcl index 168902c..d212f34 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -763,18 +763,22 @@ proc ShowControls { permission_list user } { set user_groups_for_hide [removeElementFromList $grp $user_groups_for_hide] } # output group to hide offering - if { $user_groups_for_hide ne "" } { - puts "
" - puts "HideGroup: " - foreach grp $user_groups_for_hide { - puts "$grp" + if { [isActionGranted userhidegroup $permission_list $user] } { + if { $user_groups_for_hide ne "" } { + puts "
" + puts "HideGroup: " + foreach grp $user_groups_for_hide { + puts "$grp" + } } } - if { $currently_hidden_groups ne "" } { - puts "
" - puts {Unhide groups: } - foreach grp $currently_hidden_groups { - puts "$grp" + if { [isActionGranted userunhidegroup $permission_list $user] } { + if { $currently_hidden_groups ne "" } { + puts "
" + puts {Unhide groups: } + foreach grp $currently_hidden_groups { + puts "$grp" + } } } -- cgit v1.2.3