本文整理汇总了PHP中ACLController类的典型用法代码示例。如果您正苦于以下问题:PHP ACLController类的具体用法?PHP ACLController怎么用?PHP ACLController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ACLController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
global $current_user, $app_strings, $mod_strings;
$admin = is_admin($current_user) || is_admin_for_module($current_user, 'Reports');
foreach ($this->data['data'] as $i => $rowData) {
if (isset($this->data['data'][$i]['IS_PUBLISHED'])) {
$this->data['data'][$i]['IS_PUBLISHED'] = "<input type='checkbox' ";
if ($rowData['IS_PUBLISHED'] == 'yes') {
$this->data['data'][$i]['IS_PUBLISHED'] .= ' checked ';
}
if ($admin) {
$this->data['data'][$i]['IS_PUBLISHED'] .= " onclick='location.href=\"index.php?module=Reports&action=index&publish=no&publish_report_id={$rowData['ID']}\";'>";
} else {
$this->data['data'][$i]['IS_PUBLISHED'] .= ' disabled=true>';
}
}
if (isset($this->data['data'][$i]['IS_SCHEDULED'])) {
$this->data['data'][$i]['IS_SCHEDULED'] = "<a href='#' onclick=\"schedulePOPUP('{$rowData['ID']}'); return false\" class='listViewTdToolsS1'>{$rowData['IS_SCHEDULED_IMG']} {$rowData['IS_SCHEDULED']}</a>";
}
if (!isset($this->data['data'][$i]['IS_EDIT'])) {
if ($this->data['data'][$i]['ASSIGNED_USER_ID'] != $current_user->id || !ACLController::checkAccess('Reports', 'edit', $this->data['data'][$i]['ASSIGNED_USER_ID'])) {
$this->data['data'][$i]['IS_EDIT'] = " ";
} else {
$this->data['data'][$i]['IS_EDIT'] = "<a title=\"{$app_strings['LBL_EDIT_BUTTON']}\" href=\"index.php?action=ReportsWizard&module=Reports&page=report&record={$rowData['ID']}\">" . SugarThemeRegistry::current()->getImage("edit_inline", '', null, null, ".gif", $mod_strings['LBL_EDIT']) . "</a>";
}
}
}
$this->ss->assign('act', 'ReportsWizard');
return parent::display();
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:30,代码来源:ListViewReports.php
示例2: loadBean
/**
* @see SugarController::loadBean()
*/
public function loadBean()
{
global $mod_strings;
if (!isset($_REQUEST['import_module'])) {
return;
// there is no module to load
}
$this->importModule = $_REQUEST['import_module'];
$this->bean = BeanFactory::getBean($this->importModule);
if ($this->bean) {
if (!$this->bean->importable) {
$this->bean = false;
} elseif ($_REQUEST['import_module'] == 'Users' && !is_admin($GLOBALS['current_user'])) {
$this->bean = false;
} elseif ($this->bean->bean_implements('ACL')) {
if (!ACLController::checkAccess($this->bean->module_dir, 'import', true)) {
ACLController::displayNoAccess();
sugar_die('');
}
}
}
if (!$this->bean && $this->importModule != "Administration") {
$_REQUEST['message'] = $mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'];
$this->view = 'error';
if (!isset($_REQUEST['import_map_id']) && !isset($_REQUEST['delete_map_id'])) {
$this->_processed = true;
}
} else {
$GLOBALS['FOCUS'] = $this->bean;
}
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:34,代码来源:controller.php
示例3: display
function display($defines)
{
if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) {
$temp = '';
return $temp;
}
global $app_strings;
global $mod_strings;
global $currentModule;
$title = $app_strings['LBL_TRACK_EMAIL_BUTTON_TITLE'];
$accesskey = $app_strings['LBL_TRACK_EMAIL_BUTTON_KEY'];
$value = $app_strings['LBL_TRACK_EMAIL_BUTTON_LABEL'];
$this->module = 'Emails';
$additionalFormFields = array();
$additionalFormFields['type'] = 'archived';
// cn: bug 5727 - must override the parents' parent for contacts (which could be an Account)
$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
$additionalFormFields['parent_id'] = $defines['focus']->id;
$additionalFormFields['parent_name'] = $defines['focus']->name;
if (isset($defines['focus']->email1)) {
$additionalFormFields['to_email_addrs'] = $defines['focus']->email1;
}
if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) {
$button = "<input title='{$title}' class='button' type='button' name='button' value=' {$value} ' disabled/>\n";
return $button;
}
$button = $this->_get_form($defines, $additionalFormFields);
$button .= "<input title='{$title}' accesskey='{$accesskey}' class='button' type='submit' name='button' value=' {$value} '/>\n";
$button .= "</form>";
return $button;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:SugarWidgetSubPanelTopArchiveEmailButton.php
示例4: display
function display()
{
ob_start();
if (isset($GLOBALS['cal_strings'])) {
return parent::display() . "Only one Calendar dashlet is allowed.";
}
require_once 'modules/Calendar/Calendar.php';
require_once 'modules/Calendar/CalendarDisplay.php';
require_once "modules/Calendar/CalendarGrid.php";
global $cal_strings, $current_language;
$cal_strings = return_module_language($current_language, 'Calendar');
if (!ACLController::checkAccess('Calendar', 'list', true)) {
ACLController::displayNoAccess(true);
}
$cal = new Calendar($this->view);
$cal->dashlet = true;
$cal->add_activities($GLOBALS['current_user']);
$cal->load_activities();
$display = new CalendarDisplay($cal, $this->id);
$display->display_calendar_header(false);
$display->display();
$str = ob_get_contents();
ob_end_clean();
return parent::display() . $str;
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:25,代码来源:CalendarDashlet.php
示例5: preDisplay
public function preDisplay()
{
if (!$this->bean->ACLAccess('edit')) {
ACLController::displayNoAccess();
sugar_die('');
}
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:7,代码来源:view.convertlead.php
示例6: display
function display($defines)
{
global $app_strings;
global $currentModule;
$title = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_TITLE'];
$accesskey = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_KEY'];
$value = $app_strings['LBL_COMPOSE_EMAIL_BUTTON_LABEL'];
$this->module = 'Emails';
$to_addrs = '';
$additionalFormFields = array();
$additionalFormFields['type'] = 'out';
// cn: bug 5727 - must override the parents' parent for contacts (which could be an Account)
$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
$additionalFormFields['parent_id'] = $defines['focus']->id;
$additionalFormFields['parent_name'] = $defines['focus']->name;
if (isset($defines['focus']->email1)) {
$to_addrs = $defines['focus']->email1;
} elseif ($defines['focus']->object_name == 'Case') {
require_once 'modules/Accounts/Account.php';
$acct = new Account();
$acct->retrieve($defines['focus']->account_id);
$to_addrs = $acct->email1;
}
if (!empty($to_addrs)) {
$additionalFormFields['to_email_addrs'] = $to_addrs;
}
if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) {
$button = "<input title='{$title}' class='button' type='button' name='button' value=' {$value} '/>\n";
return $button;
}
$button = $this->_get_form($defines, $additionalFormFields);
$button .= "<input title='{$title}' accesskey='{$accesskey}' class='button' type='submit' name='button' value=' {$value} '/>\n";
$button .= "</form>";
return $button;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:35,代码来源:SugarWidgetSubPanelTopComposeEmailButton.php
示例7: get_new_record_form
/**
* Create HTML form to enter a new record with the minimum necessary fields.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
*/
function get_new_record_form()
{
if (!ACLController::checkAccess('Tasks', 'edit', true)) {
return '';
}
require_once 'include/time.php';
global $app_strings, $mod_strings, $app_list_strings;
global $current_user;
global $theme;
// Unimplemented until jscalendar language files are fixed
// global $current_language;
// global $default_language;
// global $cal_codes;
$user_id = $current_user->id;
$default_status = $mod_strings['LBL_DEFAULT_STATUS'];
$default_priority = $mod_strings['LBL_DEFAULT_PRIORITY'];
$default_parent_type = $app_list_strings['record_type_default_key'];
// Unimplemented until jscalendar language files are fixed
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
$cal_lang = "en";
$cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
$ntc_time_format = '(' . getDisplayTimeFormat() . ')';
$ampm = AMPMMenu('', '');
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
$the_form .= <<<EOQ
\t\t<form name="TaskSave" onSubmit="return check_form('TaskSave')" method="POST" action="index.php">
\t\t\t<input type="hidden" name="module" value="Tasks">
\t\t\t<input type="hidden" name="record" value="">
\t\t\t<input type="hidden" name="status" value="{$default_status}">
\t\t\t<input type="hidden" name="assigned_user_id" value='{$user_id}'>
\t\t\t<input type="hidden" name="priority" value="{$default_priority}">
\t\t\t<input type="hidden" name="parent_type" value="{$default_parent_type}">
\t\t\t<input type="hidden" name="action" value="Save">
\t\t\t<input type="hidden" name="date_due_flag">
\t\t<p>{$mod_strings['LBL_NEW_FORM_SUBJECT']} <span class="required">{$app_strings['LBL_REQUIRED_SYMBOL']}</span><br>
\t\t<input name='name' type="text" value=""><br>
\t\t{$mod_strings['LBL_NEW_FORM_DUE_DATE']} <span class="dateFormat">{$app_strings['NTC_DATE_FORMAT']}</span><br>
\t\t<input name='date_due' maxlength="10" onblur="parseDate(this, '{$cal_dateformat}');" id='jscal_field' type="text" value=""> <img src="themes/{$theme}/images/jscalendar.gif" alt="{$app_strings['LBL_ENTER_DATE']}" id="jscal_trigger" align="absmiddle"><br>
\t\t{$mod_strings['LBL_NEW_FORM_DUE_TIME']} <span class="dateFormat">{$ntc_time_format}</span><br>
\t\t<input name='time_due' maxlength='5' type="text"> {$ampm}</p>
\t\t<p><input title="{$app_strings['LBL_SAVE_BUTTON_TITLE']}" accessKey="{$app_strings['LBL_SAVE_BUTTON_KEY']}" class="button" type="submit" name="button" value="{$app_strings['LBL_SAVE_BUTTON_LABEL']}" ></p>
\t\t</form>
\t\t<script type="text/javascript">
\t\tCalendar.setup ({
\t\t\tinputField : "jscal_field", ifFormat : "{$cal_dateformat}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1
\t\t});
\t\t</script>
EOQ;
require_once 'include/javascript/javascript.php';
require_once 'modules/Tasks/Task.php';
$javascript = new javascript();
$javascript->setFormName('TaskSave');
$javascript->setSugarBean(new Task());
$javascript->addRequiredFields('');
$javascript->addField('date_due', false, '');
$javascript->addField('time_due', false, '');
$the_form .= $javascript->getScript();
$the_form .= get_left_form_footer();
return $the_form;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:66,代码来源:Forms.php
示例8: display
/**
* display
* Override the display method to support customization for the buttons that display
* a popup and allow you to copy the account's address into the selected contacts.
* The custom_code_billing and custom_code_shipping Smarty variables are found in
* include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S.
* locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
*/
function display()
{
if (empty($this->bean->id)) {
global $app_strings;
sugar_die($app_strings['ERROR_NO_RECORD']);
}
require_once 'modules/AOS_PDF_Templates/formLetter.php';
formLetter::DVPopupHtml('Accounts');
$this->dv->process();
global $mod_strings;
if (ACLController::checkAccess('Contacts', 'edit', true)) {
$push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->billing_address_street)) . '&primary_address_city=' . $this->bean->billing_address_city . '&primary_address_state=' . $this->bean->billing_address_state . '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . '&primary_address_country=' . $this->bean->billing_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
$push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->shipping_address_street)) . '&primary_address_city=' . $this->bean->shipping_address_city . '&primary_address_state=' . $this->bean->shipping_address_state . '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . '&primary_address_country=' . $this->bean->shipping_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
} else {
$push_billing = '';
$push_shipping = '';
}
$this->ss->assign("custom_code_billing", $push_billing);
$this->ss->assign("custom_code_shipping", $push_shipping);
if (empty($this->bean->id)) {
global $app_strings;
sugar_die($app_strings['ERROR_NO_RECORD']);
}
echo $this->dv->display();
}
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:33,代码来源:view.detail.php
示例9: get_system_tabs
function get_system_tabs()
{
global $moduleList;
static $system_tabs_result = null;
// if the value is not already cached, then retrieve it.
if (empty($system_tabs_result)) {
$administration = new Administration();
$administration->retrieveSettings('MySettings');
if (isset($administration->settings) && isset($administration->settings['MySettings_tab'])) {
$tabs = $administration->settings['MySettings_tab'];
$trimmed_tabs = trim($tabs);
//make sure serialized string is not empty
if (!empty($trimmed_tabs)) {
$tabs = base64_decode($tabs);
$tabs = unserialize($tabs);
//Ensure modules saved in the prefences exist.
foreach ($tabs as $id => $tab) {
if (!in_array($tab, $moduleList)) {
unset($tabs[$id]);
}
}
ACLController::filterModuleList($tabs);
$tabs = $this->get_key_array($tabs);
$system_tabs_result = $tabs;
} else {
$system_tabs_result = $this->get_key_array($moduleList);
}
} else {
$system_tabs_result = $this->get_key_array($moduleList);
}
}
return $system_tabs_result;
}
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:33,代码来源:TabController.php
示例10: template_pagination
function template_pagination(&$args)
{
$smarty = new Sugar_Smarty();
$reporter = $args['reporter'];
global $mod_strings;
// disable export if configured to
global $current_user, $sugar_config, $app_strings;
$smarty->assign('mod_strings', $mod_strings);
$smarty->assign('app_strings', $app_strings);
$is_owner = true;
if (isset($args['reporter']->saved_report) && $args['reporter']->saved_report->assigned_user_id != $current_user->id) {
$is_owner = false;
}
// if
$isExportAccess = false;
if (!ACLController::checkAccess('Reports', 'export', $is_owner) || $sugar_config['disable_export'] || !empty($sugar_config['admin_export_only']) && !(is_admin($current_user) || ACLController::moduleSupportsACL($reporter->module) && ACLAction::getUserAccessLevel($current_user->id, $reporter->module, 'access') == ACL_ALLOW_ENABLED && ACLAction::getUserAccessLevel($current_user->id, $reporter->module, 'admin') == ACL_ALLOW_ADMIN)) {
// no op
} else {
$smarty->assign('exportImagePath', SugarThemeRegistry::current()->getImage('export', " border='0' align='absmiddle'", null, null, '.gif', translate('LBL_EXPORT')));
$isExportAccess = true;
}
// else
$smarty->assign('isExportAccess', $isExportAccess);
$smarty->assign('start_link_ImagePath', SugarThemeRegistry::current()->getImage("start_off", " border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_START']));
$smarty->assign('prev_link_ImagePath', SugarThemeRegistry::current()->getImage("previous_off", "border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_PREVIOUS']));
$smarty->assign('end_link_ImagePath', SugarThemeRegistry::current()->getImage("end_off", "border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_END']));
$smarty->assign('next_link_ImagePath', SugarThemeRegistry::current()->getImage("next_off", "border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_NEXT']));
$smarty->assign('start_link_disabled', true);
$smarty->assign('prev_link_disabled', true);
$smarty->assign('end_link_disabled', true);
$smarty->assign('next_link_disabled', true);
$next = $reporter->row_end + $reporter->report_offset;
if ($reporter->report_offset > 0) {
$prev = $reporter->report_offset - $reporter->report_max;
$smarty->assign('start_link_ImagePath', SugarThemeRegistry::current()->getImage("start", " border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_START']));
$smarty->assign('start_link_onclick', "onClick=javascript:set_offset(0);");
$smarty->assign('start_link_disabled', false);
$smarty->assign('prev_link_ImagePath', SugarThemeRegistry::current()->getImage("previous", "border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_PREVIOUS']));
$smarty->assign('prev_link_onclick', "onClick=javascript:set_offset({$prev});");
$smarty->assign('prev_link_disabled', false);
}
// if
if ($next < $reporter->total_count) {
$end = ceil($reporter->total_count / $reporter->report_max - 1) * $reporter->report_max;
$smarty->assign('end_link_ImagePath', SugarThemeRegistry::current()->getImage("end", " border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_END']));
$smarty->assign('end_link_disabled', false);
$smarty->assign('end_link_onclick', "onClick=javascript:set_offset({$end});");
$smarty->assign('next_link_ImagePath', SugarThemeRegistry::current()->getImage("next", " border='0' align='absmiddle'", null, null, '.gif', $app_strings['LNK_LIST_NEXT']));
$smarty->assign('next_link_disabled', false);
$smarty->assign('next_link_onclick', "onClick=javascript:set_offset({$next});");
}
// if
$start_range = $reporter->report_offset > 0 ? $reporter->row_start + $reporter->report_offset : ($reporter->total_count == 0 ? 0 : 1);
$end_range = $reporter->row_end + $reporter->report_offset;
$smarty->assign('start_range', $start_range);
$smarty->assign('end_range', $end_range);
$smarty->assign('total_count', $reporter->total_count);
return $smarty->fetch("modules/Reports/templates/_template_pagination.tpl");
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:59,代码来源:templates_list_view.php
示例11: preDisplay
public function preDisplay()
{
parent::preDisplay();
if (ACLController::checkAccess('KBDocuments', 'edit', true)) {
array_push($this->dv->defs['templateMeta']['form']['buttons'], array('customCode' => '<input title="{$MOD.LBL_CREATE_KB_DOCUMENT}" accessKey="M" class="button" onclick="this.form.return_module.value=\'Cases\'; this.form.return_action.value=\'DetailView\';this.form.action.value=\'EditView\';this.form.module.value=\'KBDocuments\';" type="submit" name="button" value="{$MOD.LBL_CREATE_KB_DOCUMENT}">', 'sugar_html' => array('type' => 'submit', 'value' => '{$MOD.LBL_CREATE_KB_DOCUMENT}', 'htmlOptions' => array('title' => '{$MOD.LBL_CREATE_KB_DOCUMENT}', 'accessKey' => 'M', 'class' => 'button', 'onclick' => 'this.form.return_module.value=\'Cases\'; this.form.return_action.value=\'DetailView\';this.form.action.value=\'EditView\';this.form.module.value=\'KBDocuments\';', 'name' => 'button'))));
}
$this->dv->th->deleteTemplate($this->dv->module, $this->dv->view);
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:view.detail.php
示例12: addSseVisibilityFilter
public function addSseVisibilityFilter($engine, $filter)
{
if ($this->bean->bean_implements('ACL') && ACLController::requireOwner($this->bean->module_dir, 'list')) {
if ($engine instanceof SugarSearchEngineElastic) {
$filter->addMust($engine->getOwnerTermFilter());
}
}
return $filter;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:9,代码来源:ACLVisibility.php
示例13: display
function display()
{
$this->bean->password = empty($this->bean->password) ? '' : EAPM::$passwordPlaceholder;
$this->ss->assign('return_id', $this->_returnId);
if ($GLOBALS['current_user']->is_admin || empty($this->bean) || empty($this->bean->id) || $this->bean->isOwner($GLOBALS['current_user']->id)) {
parent::display();
} else {
ACLController::displayNoAccess();
}
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:view.detail.php
示例14: checkAccess
public function checkAccess($thisReport)
{
global $current_user;
require_once 'modules/ACL/ACLController.php';
if (ACLController::checkAccess('KReports', 'export', false)) {
return true;
} else {
return false;
}
}
开发者ID:ambientelivre,项目名称:GeneratorTargetList,代码行数:10,代码来源:kreportintegrationplugin.php
示例15: buildExportLink
function buildExportLink($id = 'export_link')
{
$script = "";
if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) {
if ($this->export) {
$script = parent::buildExportLink($id);
}
}
return $script . formLetter::LVSmarty();
}
开发者ID:santara12,项目名称:advanced-opensales,代码行数:10,代码来源:AccountsListViewSmarty.php
示例16: listviewACLHelper
/**
* Extends SugarBean::listviewACLHelper
*
* @return array
*/
public function listviewACLHelper()
{
$array_assign = parent::listviewACLHelper();
$is_owner = false;
if (!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)) {
$array_assign['ACCOUNT'] = 'a';
} else {
$array_assign['ACCOUNT'] = 'span';
}
return $array_assign;
}
开发者ID:omusico,项目名称:sugar_work,代码行数:16,代码来源:UsersLastImport.php
示例17: checkDashletDisplay
function checkDashletDisplay()
{
if (!in_array($this->type, $GLOBALS['moduleList']) && !in_array($this->type, $GLOBALS['modInvisList']) && (!in_array('Activities', $GLOBALS['moduleList']) || !in_array($this->type, $GLOBALS['modInvisListActivities']))) {
$displayDashlet = false;
} elseif (ACLController::moduleSupportsACL($this->type) && !ACLController::checkAccess($this->type, 'list', true)) {
$displayDashlet = false;
} else {
$displayDashlet = true;
}
return $displayDashlet;
}
开发者ID:klr2003,项目名称:sourceread,代码行数:11,代码来源:MySugar.php
示例18: preDisplay
function preDisplay()
{
$this->sugarpdfBean = SugarpdfFactory::loadSugarpdf($this->sugarpdf, $this->module, $this->bean, $this->view_object_map);
// ACL control
if (!empty($this->bean) && !$this->bean->ACLAccess($this->sugarpdfBean->aclAction)) {
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (isset($this->errors)) {
$this->sugarpdfBean->errors = $this->errors;
}
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:12,代码来源:view.sugarpdf.php
示例19: addMenuItem
/**
* adds a menu item to the current contextMenu
*
* @param string $text text of the item
* @param string $action function or pointer to the javascript function to call
* @param array $params other parameters includes:
* url - The URL for the MenuItem's anchor's "href" attribute.
* target - The value to be used for the MenuItem's anchor's "target" attribute.
* helptext - Additional instructional text to accompany the text for a MenuItem. Example: If the text is
* "Copy" you might want to add the help text "Ctrl + C" to inform the user there is a keyboard
* shortcut for the item.
* emphasis - If set to true the text for the MenuItem will be rendered with emphasis (using <em>).
* strongemphasis - If set to true the text for the MenuItem will be rendered with strong emphasis (using <strong>).
* disabled - If set to true the MenuItem will be dimmed and will not respond to user input or fire events.
* selected - If set to true the MenuItem will be highlighted.
* submenu - Appends / removes a menu (and it's associated DOM elements) to / from the MenuItem.
* checked - If set to true the MenuItem will be rendered with a checkmark.
*/
function addMenuItem($text, $action, $module = null, $aclAction = null, $params = null)
{
// check ACLs if module and aclAction set otherwise no ACL check
if (!empty($module) && !empty($aclAction) && ACLController::checkAccess($module, $aclAction) || (empty($module) || empty($aclAction))) {
$item = array('text' => translate($text), 'action' => $action);
foreach (array('url', 'target', 'helptext', 'emphasis', 'strongemphasis', 'disabled', 'selected', 'submenu', 'checked') as $param) {
if (!empty($params[$param])) {
$item[$param] = $params[$param];
}
}
array_push($this->menuItems, $item);
}
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:contextMenu.php
示例20: buildExportLink
function buildExportLink($id = 'export_link')
{
global $app_strings;
global $sugar_config;
$script = "";
if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) {
if ($this->export) {
$script = parent::buildExportLink($id);
}
}
$script .= "<a href='javascript:void(0)' id='map_listview_top' " . " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>";
return formLetter::LVSmarty() . $script;
}
开发者ID:anmoldeep,项目名称:erp,代码行数:13,代码来源:ContactsListViewSmarty.php
注:本文中的ACLController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论