From d0a760c187940265f7d78b915fcd83e2e62f04be Mon Sep 17 00:00:00 2001 From: mattf Date: Sat, 15 Aug 2020 04:42:29 +0000 Subject: [PATCH] Added option '2' to the User Modify "Modify Leads" setting allowing admin users to modify all lead fields except for phone number and alt phone. git-svn-id: svn://192.168.202.10@3274 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 3 +++ extras/MySQL_AST_CREATE_tables.sql | 4 ++-- extras/upgrade_2.14.sql | 4 ++++ www/vicidial/admin.php | 7 ++++--- www/vicidial/admin_modify_lead.php | 28 +++++++++++++++++++++------- www/vicidial/help_documentation.txt | 4 ++-- 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/UPGRADE b/UPGRADE index b51e89b5..d1906cde 100644 --- a/UPGRADE +++ b/UPGRADE @@ -519,6 +519,9 @@ OTHER CHANGES: 145. Added tools for International DNC phone number scrubbing. See the INTERNATIONAL_DNC_SCRUB.txt doc for more information. +146. Added option '2' to the User Modify "Modify Leads" setting allowing admin + users to modify all lead fields except for phone number and alt phone. + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 00d4adb7..37d4aa5e 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -562,7 +562,7 @@ campaign_detail ENUM('0','1') default '0', ast_admin_access ENUM('0','1') default '0', ast_delete_phones ENUM('0','1') default '0', delete_scripts ENUM('0','1') default '0', -modify_leads ENUM('0','1') default '0', +modify_leads ENUM('0','1','2','3','4','5','6') default '0', hotkeys_active ENUM('0','1') default '0', change_agent_campaign ENUM('0','1') default '0', agent_choose_ingroups ENUM('0','1') default '1', @@ -4666,4 +4666,4 @@ INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Pro UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1603',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1604',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql index 81ade9e8..dc259ad0 100644 --- a/extras/upgrade_2.14.sql +++ b/extras/upgrade_2.14.sql @@ -1303,3 +1303,7 @@ KEY vicidial_country_dnc_queue_filename_key (filename) INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---',''); UPDATE system_settings SET db_schema_version='1603',db_schema_update_date=NOW() where db_schema_version < 1603; + +ALTER TABLE vicidial_users MODIFY modify_leads ENUM('0','1','2','3','4','5','6') default '0'; + +UPDATE system_settings SET db_schema_version='1604',db_schema_update_date=NOW() where db_schema_version < 1604; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 444b6372..e129ad8f 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -4704,12 +4704,13 @@ else # 200711-1822 - Added EVERY_NEW_ADMINCALL option for QM PAUSEREASON system setting # 200719-1645 - Added EVERY_NEW_ALLCALL option for QM PAUSEREASON system setting # 200814-2249 - Added International DNC scrub options +# 200815-0015 - Added another modify_leads option for users # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-764a'; -$build = '200814-2249'; +$admin_version = '2.14-765a'; +$build = '200815-0015'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -22799,7 +22800,7 @@ if ($ADD==3) echo ""._QXZ("Modify Lists").": $NWB#users-modify_sections$NWE\n"; echo ""._QXZ("Delete Lists").": $NWB#users-delete_lists$NWE\n"; echo ""._QXZ("Load Leads").": $NWB#users-load_leads$NWE\n"; - echo ""._QXZ("Modify Leads").": $NWB#users-modify_leads$NWE\n"; + echo ""._QXZ("Modify Leads").": $NWB#users-modify_leads$NWE\n"; echo ""._QXZ("GDPR-Compliant Export Delete Leads").": \n"; echo ""._QXZ("Country")." :   \n"; echo " "._QXZ("Date of Birth").": \n"; - echo "$label_phone_number : \n"; - echo "$label_phone_code : \n"; - echo "$label_alt_phone : \n"; + + if ( ($LOGmodify_leads == '1') or ($lead_id == 'NEW') ) + { + echo "$label_phone_number : \n"; + echo "$label_phone_code : \n"; + echo "$label_alt_phone : \n"; + } + else + { + echo "$label_phone_number : ".htmlparse($phone_number)."\n"; + echo "$label_phone_code : ".htmlparse($phone_code)."\n"; + echo "$label_alt_phone : ".htmlparse($alt_phone)."\n"; + } + echo "$label_email : \n"; echo "$label_security_phrase : \n"; echo "$label_vendor_lead_code : \n"; @@ -2137,7 +2151,7 @@ else if ( ($LOGadmin_hide_lead_data == '0') or ($lead_id == 'NEW') ) { - echo "\n"; + echo "\n"; } echo "\n"; echo "


\n"; @@ -3009,7 +3023,7 @@ else echo "

\n"; } - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level >= 9 and modify_leads='1';"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level >= 9 and modify_leads IN('1','2','3','4','5','6');"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt index af862d6a..6c1b9dde 100644 --- a/www/vicidial/help_documentation.txt +++ b/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 202000814220301 +# version: 202000815003601 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N. @@ -71,7 +71,7 @@ users-modify_servers Modify Servers This setting will allow access for the users-modify_statuses Modify Statuses This setting will allow access for the user to modify the following sections - system statuses, status groups, status categories, CID groups and VM message groups. users-ast_delete_phones AGC Delete Phones This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. users-delete_scripts Delete Scripts This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. -users-modify_leads Modify Leads This option if set to 1 allows the user to modify leads in the admin section lead search results page. +users-modify_leads Modify Leads This option if set to 1 allows the user to modify leads in the admin section lead search results page. If this option is set to 2, the admin user can modify all lead fields except for the phone number and alt number fields. users-export_gdpr_leads GDPR-Compliant Export Delete Leads This setting if enabled will allow for the complete download and/or deletion of all customer data for a particular lead, in compliance with the General Data Protection Regulation (GDPR). Default is 0 for disabled. A setting of 1 will enable downloading data, and a setting of 2 will enable not just downloading, but also deletion of data, including any recordings.
You are not allowed to set this user setting higher than the current system setting. users-modify_email_accounts Modify Email Accounts This option if set to 1 allows the user to modify email accounts in the email account management page. users-change_agent_campaign Change Agent Campaign This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it.