Skip to content
Snippets Groups Projects
Commit dcc881fa authored by Satish's avatar Satish
Browse files

Showing error message while clicking on provide configuration through non admin.

parent f1023a0c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -32,7 +32,7 @@ class PBXManager_Module_Model extends Vtiger_Module_Model {
public function getModuleBasicLinks() {
$basicLinks = parent::getModuleBasicLinks();
foreach ($basicLinks as $key => $basicLink) {
if ($basicLink['linklabel'] == 'LBL_ADD_RECORD') {
if (in_array($basicLink['linklabel'], array('LBL_ADD_RECORD', 'LBL_IMPORT'))) {
unset($basicLinks[$key]);
}
}
......@@ -47,27 +47,31 @@ class PBXManager_Module_Model extends Vtiger_Module_Model {
if(!$this->isEntityModule()) {
return array();
}
vimport('~~modules/com_vtiger_workflow/VTWorkflowUtils.php');
$layoutEditorImagePath = Vtiger_Theme::getImagePath('LayoutEditor.gif');
$editWorkflowsImagePath = Vtiger_Theme::getImagePath('EditWorkflows.png');
$settingsLinks = array();
$currentUser = Users_Record_Model::getCurrentUserModel();
if($currentUser->isAdminUser()) {
vimport('~~modules/com_vtiger_workflow/VTWorkflowUtils.php');
$layoutEditorImagePath = Vtiger_Theme::getImagePath('LayoutEditor.gif');
$editWorkflowsImagePath = Vtiger_Theme::getImagePath('EditWorkflows.png');
if(VTWorkflowUtils::checkModuleWorkflow($this->getName())) {
$settingsLinks[] = array(
'linktype' => 'LISTVIEWSETTING',
'linklabel' => 'LBL_EDIT_WORKFLOWS',
'linkurl' => 'index.php?parent=Settings&module=Workflows&view=List&sourceModule='.$this->getName(),
'linkicon' => $editWorkflowsImagePath
);
}
if(VTWorkflowUtils::checkModuleWorkflow($this->getName())) {
$settingsLinks[] = array(
'linktype' => 'LISTVIEWSETTING',
'linklabel' => 'LBL_EDIT_WORKFLOWS',
'linkurl' => 'index.php?parent=Settings&module=Workflows&view=List&sourceModule='.$this->getName(),
'linkicon' => $editWorkflowsImagePath
'linktype' => 'LISTVIEWSETTINGS',
'linklabel'=> 'LBL_SERVER_CONFIGURATION',
'linkurl' => 'index.php?parent=Settings&module=PBXManager&view=Index',
'linkicon'=> ''
);
}
$settingsLinks[] = array(
'linktype' => 'LISTVIEWSETTINGS',
'linklabel'=> 'LBL_SERVER_CONFIGURATION',
'linkurl' => 'index.php?parent=Settings&module=PBXManager&view=Index',
'linkicon'=> ''
);
return $settingsLinks;
}
......
<?php
/* +**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
* ***********************************************************************************/
class PBXManager_List_View extends Vtiger_List_View {
function process(Vtiger_Request $request) {
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
$viewName = $request->get('viewname');
if ($viewName) {
$this->viewName = $viewName;
}
$this->initializeListViewContents($request, $viewer);
$this->assignCustomViews($request, $viewer);
$viewer->assign('VIEW', $request->get('view'));
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('RECORD_ACTIONS', $this->getRecordActionsFromModule($moduleModel));
$viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->assign('IS_CREATE_PERMITTED', false);
$viewer->assign('IS_MODULE_EDITABLE', false);
$viewer->assign('IS_MODULE_DELETABLE', false);
$viewer->view('ListViewContents.tpl', $moduleName);
}
public function getRecordActionsFromModule($moduleModel) {
$recordActions = array();
$recordActions['edit'] = false;
$recordActions['delete'] = false;
return $recordActions;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment