aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook_lib.tcl10
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
}