diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-21 17:32:41 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-21 17:33:32 -0500 |
commit | 9fbc36f44fb5af4fbd692e0b2dd2c95258bc3cea (patch) | |
tree | 9e71a8dc251d5b24cb24c26ef81e1e2d0d8733d6 | |
parent | 462cbe8a3a92ddaf29ee1c3e406461197265accd (diff) | |
download | GradeBook-9fbc36f44fb5af4fbd692e0b2dd2c95258bc3cea.tar.gz GradeBook-9fbc36f44fb5af4fbd692e0b2dd2c95258bc3cea.zip |
better logging
-rwxr-xr-x | GradeBook_lib.tcl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 2125384..f595de6 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -1132,7 +1132,7 @@ proc isActionGranted { action permission_list user } { proc ChoseAction {action permission_list user} { array set permission $permission_list - dbg "requested action: $action" 1 + dbg "requested action: $action" msg_level_info if { [isActionGranted $action $permission_list $user] } { switch $action { @@ -1194,6 +1194,7 @@ proc ChoseAction {action permission_list user} { } else { # this action is permitted to everyone by default #ChoseAction defaultview $permission_list $user + dbg "action $action isn not permitted for $user" msg_level_info } } @@ -1309,6 +1310,7 @@ proc SetNewPassword {db permission_list user } { } if { $newpassword eq "" } { + dbg "Attempt to set empty password which is not permitted" msg_level_info htmlErrorMsg "Empty passwords are not permitted" return } @@ -1846,7 +1848,7 @@ proc Authenticate_User { user_requested password } { } proc AccessGroupRights {db user password } { - dbg "access rights check for user: $user" + dbg "access rights check for user: $user" msg_level_info set PasswordHash [::md5::md5 -hex $password] set eval_str [list SELECT GroupName FROM GradesTable WHERE UserName='$user' AND PasswordHash='$PasswordHash'] db eval $eval_str group_name_array {} @@ -1855,11 +1857,11 @@ proc AccessGroupRights {db user password } { } else { set group guest } - dbg "Detected group is $group" + dbg "Detected group is $group" msg_level_info set eval_str [list SELECT actionname,$group FROM AccessRightsTable ] set permission_list [list GroupName $group] db eval $eval_str permissions { lappend permission_list $permissions(actionname) $permissions($group) } - dbg "permissions for user $user belonging to the group $group are: $permission_list" + dbg "permissions for user $user belonging to the group $group are: $permission_list" msg_level_info return $permission_list } |