equal
deleted
inserted
replaced
727 case 'save_edit': |
727 case 'save_edit': |
728 case 'save_new': |
728 case 'save_new': |
729 var form = document.forms[aclManagerID + '_formobj']; |
729 var form = document.forms[aclManagerID + '_formobj']; |
730 selections = new Object(); |
730 selections = new Object(); |
731 var dbg = ''; |
731 var dbg = ''; |
|
732 var warned_everyone = false; |
732 for(var i in aclPermList) |
733 for(var i in aclPermList) |
733 { |
734 { |
734 selections[aclPermList[i]] = getRadioState(form, aclPermList[i], [1, 2, 3, 4]); |
735 selections[aclPermList[i]] = getRadioState(form, aclPermList[i], [1, 2, 3, 4]); |
|
736 // If we're editing permissions for everyone on the entire site and the |
|
737 // admin selected to deny privileges, give a stern warning about it. |
|
738 if ( selections[aclPermList[i]] == 1 && aclDataCache.target_type == 1 /* ACL_TYPE_GROUP */ && aclDataCache.target_id == 1 && !warned_everyone ) |
|
739 { |
|
740 warned_everyone = true; |
|
741 if ( !confirm($lang.get('acl_msg_deny_everyone_confirm')) ) |
|
742 { |
|
743 return false; |
|
744 } |
|
745 } |
735 dbg += aclPermList[i] + ': ' + selections[aclPermList[i]] + "\n"; |
746 dbg += aclPermList[i] + ': ' + selections[aclPermList[i]] + "\n"; |
736 if(!selections[aclPermList[i]]) |
747 if(!selections[aclPermList[i]]) |
737 { |
748 { |
738 alert("Invalid return from getRadioState: "+i+": "+selections[i]+" ("+typeof(selections[i])+")"); |
749 alert("Invalid return from getRadioState: "+i+": "+selections[i]+" ("+typeof(selections[i])+")"); |
739 return false; |
750 return false; |