mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Allow user with only contact_view permission to click on contact record to view numbers etc. (#5153)
* Update contacts.php Added contact_view permission to allow users with only contact view to open contact record to see numbers addresses etc. See also update to contact_edit.php to remove save buttons if user only has contact view. * Update contact_edit.php Added permissions to only show save button if user has permissions contact_add or contact_edit. This is in conjunction with the update to contacts.php
This commit is contained in:
@@ -495,7 +495,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>($action != 'update' ?: 'margin-left: 15px;'),'collapse'=>'hide-sm-dn','onclick'=>"document.getElementById('frm').submit();"]);
|
||||
if (permission_exists('contact_edit') || permission_exists('contact_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'style'=>($action != 'update' ?: 'margin-left: 15px;'),'collapse'=>'hide-sm-dn','onclick'=>"document.getElementById('frm').submit();"]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
@@ -858,4 +860,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
if (is_array($contacts) && @sizeof($contacts) != 0) {
|
||||
$x = 0;
|
||||
foreach($contacts as $row) {
|
||||
if (permission_exists('contact_edit')) {
|
||||
if (permission_exists('contact_edit') || permission_exists('contact_view')) {
|
||||
$list_row_url = "contact_edit.php?id=".urlencode($row['contact_uuid'])."&query_string=".urlencode($_SERVER["QUERY_STRING"]);
|
||||
}
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
@@ -370,4 +370,4 @@
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user