Patch 3276551 for another issue in bug 3188444

This commit is contained in:
Rouslan Placella
2011-04-05 16:21:09 -04:00
committed by Marc Delisle
parent ae4ec340d6
commit ef48add94c
2 changed files with 17 additions and 3 deletions

View File

@@ -389,8 +389,18 @@ $(document).ready(function() {
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);
}
//Change privileges if they were edited
if(data.new_privileges) {
//Check if we are on the page of the db-specific privileges
var db_priv_page = !!($('#dbspecificuserrights').length); // the "!!" part is merely there to ensure a value of type boolean
// we always need to reload on the db-specific privilege page
// and on the global page when adjusting global privileges,
// but not on the global page when adjusting db-specific privileges.
var reload_privs = false;
if (data.db_specific_privs == false || (db_priv_page == data.db_specific_privs)) {
reload_privs = true;
}
//Change privileges, if they were edited and need to be reloaded
if(data.new_privileges && reload_privs) {
$("#usersForm")
.find('.current_row')
.find('tt')