当前位置: 首页>>代码示例>>PHP>>正文


PHP ACLController::displayNoAccess方法代码示例

本文整理汇总了PHP中ACLController::displayNoAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP ACLController::displayNoAccess方法的具体用法?PHP ACLController::displayNoAccess怎么用?PHP ACLController::displayNoAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ACLController的用法示例。


在下文中一共展示了ACLController::displayNoAccess方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: preDisplay

 public function preDisplay()
 {
     if (!$this->bean->ACLAccess('edit')) {
         ACLController::displayNoAccess();
         sugar_die('');
     }
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:7,代码来源:view.convertlead.php

示例3: 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

示例4: 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

示例5: 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

示例6: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     if ($this->bean instanceof SugarBean && isset($this->view_object_map['remap_action']) && !$this->bean->ACLAccess($this->view_object_map['remap_action'])) {
         ACLController::displayNoAccess(true);
         return false;
     }
     // Call SugarController::getActionFilename to handle case sensitive file names
     $file = SugarController::getActionFilename($this->action);
     $classic_file = SugarAutoLoader::existingCustomOne('modules/' . $this->module . '/' . $file . '.php');
     if ($classic_file) {
         $this->includeClassicFile($classic_file);
         return true;
     }
     return false;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:view.classic.php

示例7: action_delete

 protected function action_delete()
 {
     global $current_user;
     //do any pre delete processing
     //if there is some custom logic for deletion.
     if (!empty($_REQUEST['record'])) {
         if (!is_admin($current_user) && $this->bean->assigned_user_id != $current_user->id) {
             ACLController::displayNoAccess(true);
             sugar_cleanup(true);
         }
         $this->bean->mark_deleted($_REQUEST['record']);
     } else {
         sugar_die("A record number must be specified to delete");
     }
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:15,代码来源:controller.php

示例8: action_removeAllRecurrences

 protected function action_removeAllRecurrences()
 {
     if (!empty($this->bean->repeat_parent_id)) {
         $id = $this->bean->repeat_parent_id;
         $this->bean->retrieve($id);
     } else {
         $id = $this->bean->id;
     }
     if (!$this->bean->ACLAccess('Delete')) {
         ACLController::displayNoAccess(true);
         sugar_cleanup(true);
     }
     require_once "modules/Calendar/CalendarUtils.php";
     CalendarUtils::markRepeatDeleted($this->bean);
     $this->bean->mark_deleted($id);
     header("Location: index.php?module=Meetings");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:17,代码来源:controller.php

示例9: load_merge_bean

 function load_merge_bean($merge_module, $load_module_strings = false, $merge_id = '')
 {
     global $moduleList;
     global $beanList;
     global $beanFiles;
     global $current_language;
     $this->merge_module = $merge_module;
     $this->merge_bean = BeanFactory::getBean($this->merge_module, $merge_id);
     // Bug 18853 - Disable this view if the user doesn't have edit and delete permissions
     if (!$this->merge_bean->ACLAccess('edit') || !$this->merge_bean->ACLAccess('delete')) {
         ACLController::displayNoAccess();
         sugar_die('');
     }
     //load master module strings
     if ($load_module_strings) {
         $this->merge_bean_strings = return_module_language($current_language, $merge_module);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:MergeRecord.php

示例10: display

 function display()
 {
     global $popupMeta, $mod_strings;
     if ($this->bean instanceof SugarBean && !$this->bean->ACLAccess('list')) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     if (isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     $popupMeta = SugarAutoLoader::loadPopupMeta($this->module, isset($_REQUEST['metadata']) ? $_REQUEST['metadata'] : null);
     $defs = $this->loadWithPopup('listviewdefs');
     if (is_array($defs)) {
         $listViewDefs[$this->module] = $defs;
     } elseif (!empty($defs)) {
         require $defs;
     }
     $defs = $this->loadWithPopup('searchdefs');
     if (is_array($defs)) {
         $searchdefs[$this->module]['layout']['advanced_search'] = $defs;
     } elseif (!empty($defs)) {
         require $defs;
     }
     if (!empty($this->bean) && isset($_REQUEST[$this->module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) {
         //if you click the pagination button, it will populate the search criteria here
         if (!empty($_REQUEST['current_query_by_page'])) {
             $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'lvso', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page');
             $current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
             foreach ($current_query_by_page as $search_key => $search_value) {
                 if ($search_key != $this->module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) {
                     $_REQUEST[$search_key] = $GLOBALS['db']->quote($search_value);
                 }
             }
         }
     }
     foreach (SugarAutoLoader::existing('modules/' . $this->module . '/Popup_picker.php', 'include/Popups/Popup_picker.php') as $file) {
         require_once $file;
         break;
     }
     $popup = new Popup_Picker();
     $popup->_hide_clear_button = true;
     echo $popup->process_page();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:44,代码来源:view.popup.php

示例11: Popup_Picker

 /**
  * Creates a new Popup_Picker object. Controls displaying of single select and multi select popups
  *
  */
 function Popup_Picker()
 {
     global $currentModule, $popupMeta;
     // cn: bug 12269 - directory navigation attack - detect and stop.
     if (isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     if (empty($popupMeta)) {
         $popupMeta = SugarAutoLoader::loadPopupMeta($currentModule, isset($_REQUEST['metadata']) ? $_REQUEST['metadata'] : null);
     }
     $this->_popupMeta = $popupMeta;
     require_once 'modules/' . $currentModule . '/' . $this->_popupMeta['moduleMain'] . '.php';
     if (isset($this->_popupMeta['create']['formBase']) && isset($_REQUEST['create']) && $_REQUEST['create'] == 'true') {
         // include create form
         require_once 'modules/' . $currentModule . '/' . $this->_popupMeta['create']['formBase'];
         $this->_create = true;
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:23,代码来源:Popup_picker.php

示例12: loadImportBean

/**
 * Returns the bean object of the given module
 *
 * @param  string $module
 * @return object
 */
function loadImportBean($module)
{
    $focus = loadBean($module);
    if ($focus) {
        if (!$focus->importable) {
            return false;
        }
        if ($module == 'Users' && !is_admin($GLOBALS['current_user']) && !is_admin_for_module($GLOBALS['current_user'], 'Users')) {
            return false;
        }
        if ($focus->bean_implements('ACL')) {
            if (!ACLController::checkAccess($focus->module_dir, 'import', true)) {
                ACLController::displayNoAccess();
                sugar_die('');
            }
        }
    } else {
        return false;
    }
    return $focus;
}
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:27,代码来源:Forms.php

示例13: loadBean

 /**
  * @see SugarController::loadBean()
  */
 public function loadBean()
 {
     global $mod_strings;
     $this->bean = loadBean($_REQUEST['import_module']);
     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) {
         $_REQUEST['message'] = $mod_strings['LBL_ERROR_IMPORTS_NOT_SET_UP'];
         $this->view = 'error';
     } else {
         $GLOBALS['FOCUS'] = $this->bean;
     }
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:26,代码来源:controller.php

示例14: processListView

 function processListView($seed, $xTemplateSection, $html_varName)
 {
     global $sugar_config;
     $populateOnly = $this->ignorePopulateOnly ? FALSE : !empty($sugar_config['save_query']) && $sugar_config['save_query'] == 'populate_only';
     if (isset($seed->module_dir) && $populateOnly) {
         if (empty($GLOBALS['displayListView']) && strcmp(strtolower($_REQUEST['action']), 'popup') != 0 && (!empty($_REQUEST['clear_query']) || $_REQUEST['module'] == $seed->module_dir && ((empty($_REQUEST['query']) || $_REQUEST['query'] == 'MSI') && (empty($_SESSION['last_search_mod']) || $_SESSION['last_search_mod'] != $seed->module_dir)))) {
             $_SESSION['last_search_mod'] = $_REQUEST['module'];
             return;
         }
     }
     if (strcmp(strtolower($_REQUEST['action']), 'popup') != 0) {
         $_SESSION['last_search_mod'] = $_REQUEST['module'];
     }
     //following session variable will track the detail view nvigation history.
     //needs to the reset after each search.
     $this->setLocalSessionVariable($html_varName, "DETAIL_NAV_HISTORY", false);
     require_once 'include/MassUpdate.php';
     $mass = new MassUpdate();
     $add_acl_javascript = false;
     if (!isset($_REQUEST['action'])) {
         $this->shouldProcess = false;
     } else {
         $this->shouldProcess = is_subclass_of($seed, "SugarBean") && ($_REQUEST['action'] == 'index' || 'ListView' == substr($_REQUEST['action'], 0, 8)) && $_REQUEST['module'] == $seed->module_dir;
     }
     //when processing a multi-select popup.
     if ($this->process_for_popups && $this->multi_select_popup) {
         $this->shouldProcess = true;
     }
     //mass update turned off?
     if (!$this->show_mass_update) {
         $this->shouldProcess = false;
     }
     if (is_subclass_of($seed, "SugarBean")) {
         if ($seed->bean_implements('ACL')) {
             if (!ACLController::checkAccess($seed->module_dir, 'list', true)) {
                 if ($_REQUEST['module'] != 'Home') {
                     ACLController::displayNoAccess();
                 }
                 return;
             }
             if (!ACLController::checkAccess($seed->module_dir, 'export', true)) {
                 $sugar_config['disable_export'] = true;
             }
         }
     }
     //force mass update form if requested.
     if ($this->force_mass_update) {
         $this->shouldProcess = true;
     }
     if ($this->shouldProcess) {
         echo $mass->getDisplayMassUpdateForm(true, $this->multi_select_popup);
         echo $mass->getMassUpdateFormHeader($this->multi_select_popup);
         $mass->setSugarBean($seed);
         //C.L. Fix for 10048, do not process handleMassUpdate for multi select popups
         if (!$this->multi_select_popup) {
             $mass->handleMassUpdate();
         }
     }
     $this->processListViewTwo($seed, $xTemplateSection, $html_varName);
     if ($this->shouldProcess && empty($this->process_for_popups)) {
         //echo "<a href='javascript:sListView.clear_all(document.MassUpdate, \"mass[]\");'>".translate('LBL_CLEARALL')."</a>";
         // cn: preserves current functionality, exception is InboundEmail
         if ($this->show_mass_update_form) {
             echo $mass->getMassUpdateForm();
         }
         if (!$this->keep_mass_update_form_open) {
             echo $mass->endMassUpdateForm();
         }
     }
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:70,代码来源:ListView.php

示例15: handleSave

 function handleSave($prefix, $redirect = true, $useRequired = false)
 {
     global $current_user;
     require_once 'include/formbase.php';
     $focus = new Opportunity();
     if ($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
         return null;
     }
     if (empty($_POST['currency_id'])) {
         $currency_id = $current_user->getPreference('currency');
         if (isset($currency_id)) {
             $focus->currency_id = $currency_id;
         }
     }
     $focus = populateFromPost($prefix, $focus);
     if (!ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))) {
         ACLController::displayNoAccess(true);
     }
     $check_notify = FALSE;
     if (isset($GLOBALS['check_notify'])) {
         $check_notify = $GLOBALS['check_notify'];
     }
     $focus->save($check_notify);
     if (!empty($_POST['duplicate_parent_id'])) {
         clone_relationship($focus->db, array('opportunities_contacts'), 'opportunity_id', $_POST['duplicate_parent_id'], $focus->id);
     }
     $return_id = $focus->id;
     $GLOBALS['log']->debug("Saved record with id of " . $return_id);
     if ($redirect) {
         handleRedirect($return_id, "Opportunities");
     } else {
         return $focus;
     }
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:34,代码来源:OpportunityFormBase.php


注:本文中的ACLController::displayNoAccess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。