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


PHP CCrmPerms::IsAccessEnabled方法代码示例

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


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

示例1: onRestServiceMethod

 public static function onRestServiceMethod($arParams, $nav, CRestServer $server)
 {
     if (!CCrmPerms::IsAccessEnabled()) {
         throw new RestException('Access denied.');
     }
     $methodName = $server->getMethod();
     $parts = explode('.', $methodName);
     $partCount = count($parts);
     if ($partCount < 3 || $parts[0] !== 'crm') {
         throw new RestException("Method '{$methodName}' is not supported in current context.");
     }
     $typeName = strtoupper($parts[1]);
     $proxy = null;
     if (isset(self::$PROXIES[$typeName])) {
         $proxy = self::$PROXIES[$typeName];
     }
     if (!$proxy) {
         if ($typeName === 'ENUM') {
             $proxy = self::$PROXIES[$typeName] = new CCrmEnumerationRestProxy();
         } elseif ($typeName === 'MULTIFIELD') {
             $proxy = self::$PROXIES[$typeName] = new CCrmMultiFieldRestProxy();
         } elseif ($typeName === 'CURRENCY') {
             $proxy = self::$PROXIES[$typeName] = new CCrmCurrencyRestProxy();
         } elseif ($typeName === 'CATALOG') {
             $proxy = self::$PROXIES[$typeName] = new CCrmCatalogRestProxy();
         } elseif ($typeName === 'PRODUCT' && strtoupper($parts[2]) === 'PROPERTY') {
             $proxy = self::$PROXIES[$typeName] = new CCrmProductPropertyRestProxy();
         } elseif ($typeName === 'PRODUCT') {
             $proxy = self::$PROXIES[$typeName] = new CCrmProductRestProxy();
         } elseif ($typeName === 'PRODUCTSECTION') {
             $proxy = self::$PROXIES[$typeName] = new CCrmProductSectionRestProxy();
         } elseif ($typeName === 'PRODUCTROW') {
             $proxy = self::$PROXIES[$typeName] = new CCrmProductRowRestProxy();
         } elseif ($typeName === 'STATUS') {
             $proxy = self::$PROXIES[$typeName] = new CCrmStatusRestProxy();
         } elseif ($typeName === 'LEAD') {
             $proxy = self::$PROXIES[$typeName] = new CCrmLeadRestProxy();
         } elseif ($typeName === 'DEAL') {
             $proxy = self::$PROXIES[$typeName] = new CCrmDealRestProxy();
         } elseif ($typeName === 'COMPANY') {
             $proxy = self::$PROXIES[$typeName] = new CCrmCompanyRestProxy();
         } elseif ($typeName === 'CONTACT') {
             $proxy = self::$PROXIES[$typeName] = new CCrmContactRestProxy();
         } elseif ($typeName === 'ACTIVITY') {
             $proxy = self::$PROXIES[$typeName] = new CCrmActivityRestProxy();
         } elseif ($typeName === 'DUPLICATE') {
             $proxy = self::$PROXIES[$typeName] = new CCrmDuplicateRestProxy();
         } elseif ($typeName === 'LIVEFEEDMESSAGE') {
             $proxy = self::$PROXIES[$typeName] = new CCrmLiveFeedMessageRestProxy();
         } elseif ($typeName === 'USERFIELD') {
             $proxy = self::$PROXIES[$typeName] = new CCrmUserFieldRestProxy(CCrmOwnerType::Undefined);
         } elseif ($typeName === 'INVOICE' && strtoupper($parts[2]) === 'STATUS') {
             $proxy = self::$PROXIES[$typeName] = new CCrmStatusInvoiceRestProxy();
         } else {
             throw new RestException("Could not find proxy for method '{$methodName}'.");
         }
         $proxy->setServer($server);
     }
     return $proxy->processMethodRequest($parts[2], $partCount > 3 ? array_slice($parts, 3) : array(), $arParams, $nav, $server);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:60,代码来源:restservice.php

示例2: checkRights

 public function checkRights()
 {
     $permissions = CCrmPerms::GetCurrentUserPermissions();
     if (!(CCrmPerms::IsAccessEnabled($permissions) && $permissions->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ'))) {
         return false;
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:8,代码来源:helper.php

示例3: IncludeModuleLangFile

<?php

require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php";
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/intranet/public/crm/index.php");
$APPLICATION->SetTitle(GetMessage("CRM_TITLE"));
$APPLICATION->SetPageProperty("BodyClass", " page-one-column");
if (CModule::IncludeModule('crm') && CCrmPerms::IsAccessEnabled()) {
    $APPLICATION->IncludeComponent('bitrix:crm.control_panel', '', array('ID' => 'COMPANY_LIST', 'ACTIVE_ITEM_ID' => '', 'PATH_TO_COMPANY_LIST' => '#SITE_DIR#crm/company/', 'PATH_TO_COMPANY_EDIT' => '#SITE_DIR#crm/company/edit/#company_id#/', 'PATH_TO_CONTACT_LIST' => '#SITE_DIR#crm/contact/', 'PATH_TO_CONTACT_EDIT' => '#SITE_DIR#crm/contact/edit/#contact_id#/', 'PATH_TO_DEAL_LIST' => '#SITE_DIR#crm/deal/', 'PATH_TO_DEAL_EDIT' => '#SITE_DIR#crm/deal/edit/#deal_id#/', 'PATH_TO_QUOTE_LIST' => '#SITE_DIR#crm/quote/', 'PATH_TO_QUOTE_EDIT' => '#SITE_DIR#crm/quote/edit/#quote_id#/', 'PATH_TO_INVOICE_LIST' => '#SITE_DIR#crm/invoice/', 'PATH_TO_INVOICE_EDIT' => '#SITE_DIR#crm/invoice/edit/#invoice_id#/', 'PATH_TO_LEAD_LIST' => '#SITE_DIR#crm/lead/', 'PATH_TO_LEAD_EDIT' => '#SITE_DIR#crm/lead/edit/#lead_id#/', 'PATH_TO_REPORT_LIST' => '#SITE_DIR#crm/reports/report/', 'PATH_TO_DEAL_FUNNEL' => '#SITE_DIR#crm/reports/', 'PATH_TO_EVENT_LIST' => '#SITE_DIR#crm/events/', 'PATH_TO_PRODUCT_LIST' => '#SITE_DIR#crm/product/', 'PATH_TO_SETTINGS' => '#SITE_DIR#crm/configs/', 'PATH_TO_SEARCH_PAGE' => '#SITE_DIR#search/index.php?where=crm'));
    $APPLICATION->IncludeComponent("bitrix:desktop", "", array("GADGETS_FIXED" => array(), "ID" => "crm", "CAN_EDIT" => "Y", "COLUMNS" => "3", "PM_URL" => "/company/personal/messages/chat/#USER_ID#/", "PATH_TO_CONPANY_DEPARTMENT" => "/company/structure.php?set_filter_structure=Y&structure_UF_DEPARTMENT=#ID#", "PATH_TO_VIDEO_CALL" => "/company/personal/video/#USER_ID#/", "NAME_TEMPLATE" => "", "SHOW_LOGIN" => "Y", "DATE_TIME_FORMAT" => LANGUAGE_ID == "en" ? "m/d/Y H:i:s" : (LANGUAGE_ID == "de" ? "d.m.Y H:i:s" : "d.m.Y H:i:s"), "DATE_FORMAT" => LANGUAGE_ID == "en" ? "m/d/Y" : (LANGUAGE_ID == "de" ? "d.m.Y" : "d.m.Y"), "DATE_FORMAT_NO_YEAR" => LANGUAGE_ID == "en" ? "m/d" : (LANGUAGE_ID == "de" ? "d.m" : "d.m"), "SHOW_YEAR" => "M", "COLUMN_WIDTH_0" => "50%", "COLUMN_WIDTH_1" => "50%", "COLUMN_WIDTH_2" => "260px", "GADGETS" => array("ALL"), "G_RSSREADER_CACHE_TIME" => "3600", "G_RSSREADER_SHOW_URL" => "N", "G_RSSREADER_PREDEFINED_RSS" => "", "GU_RSSREADER_TITLE_STD" => "", "GU_RSSREADER_CNT" => "10", "GU_RSSREADER_RSS_URL" => "", "G_VIDEO_IBLOCK_TYPE" => "", "G_VIDEO_IBLOCK_ID" => "", "G_VIDEO_LIST_URL" => "/about/media.php", "G_VIDEO_CACHE_TYPE" => "A", "G_VIDEO_CACHE_TIME" => "3600", "GU_VIDEO_TITLE_STD" => "", "G_VOTE_CHANNEL_SID" => "-", "G_VOTE_CACHE_TYPE" => "A", "G_VOTE_CACHE_TIME" => "3600", "G_VOTE_LIST_URL" => "/services/votes.php", "GU_VOTE_TITLE_STD" => "", "GU_GOOGLE_GADGETS_TITLE_STD" => "", "G_BIRTHDAY_STRUCTURE_PAGE" => "structure.php", "G_BIRTHDAY_PM_URL" => "/company/personal/messages/chat/#USER_ID#/", "G_BIRTHDAY_SHOW_YEAR" => "Y", "G_BIRTHDAY_USER_PROPERTY" => array("WORK_POSITION"), "G_BIRTHDAY_LIST_URL" => "/company/birthdays.php", "GU_BIRTHDAY_TITLE_STD" => "", "GU_BIRTHDAY_NUM_USERS" => "5", "GU_BIRTHDAY_DEPARTMENT" => "-", "G_HONOUR_LIST_URL" => "/company/leaders.php", "GU_HONOUR_TITLE_STD" => "", "GU_HONOUR_NUM_USERS" => "5", "GU_HTML_AREA_TITLE_STD" => "", "GU_FAVORITES_TITLE_STD" => "", "G_ADV_TYPE" => "-", "GU_ADV_TITLE_STD" => "", "G_TASKS_IBLOCK_ID" => "15", "G_TASKS_PAGE_VAR" => "page", "G_TASKS_GROUP_VAR" => "group_id", "G_TASKS_VIEW_VAR" => "user_id", "G_TASKS_TASK_VAR" => "task_id", "G_TASKS_ACTION_VAR" => "action", "G_TASKS_PATH_TO_GROUP_TASKS" => "/workgroups/group/#group_id#/tasks/", "G_TASKS_PATH_TO_GROUP_TASKS_TASK" => "/workgroups/group/#group_id#/tasks/task/#action#/#task_id#/", "G_TASKS_PATH_TO_USER_TASKS" => "/company/personal/user/#user_id#/tasks/", "G_TASKS_PATH_TO_USER_TASKS_TASK" => "/company/personal/user/#user_id#/tasks/task/#action#/#task_id#/", "G_TASKS_PATH_TO_TASK" => "/company/personal/user/#user_id#/tasks/", "G_TASKS_PATH_TO_TASK_NEW" => "/company/personal/user/#user_id#/tasks/task/edit/0/", "GU_TASKS_TITLE_STD" => "", "GU_TASKS_ITEMS_COUNT" => "20", "GU_TASKS_ORDER_BY" => "E", "GU_TASKS_TYPE" => "Z", "G_TICKETS_PATH_TO_TICKET_EDIT" => "/extranet/services/support.php?ID=#ID#", "G_TICKETS_PATH_TO_TICKET_NEW" => "/extranet/services/support.php?show_wizard=Y", "GU_TICKETS_TITLE_STD" => "", "GU_TICKETS_ITEMS_COUNT" => "5", "GU_TICKETS_LAMP" => array(), "G_MESSAGES_PATH_TO_USER" => "/company/personal/user/#user_id#/", "G_MESSAGES_PATH_TO_GROUP" => "/company/personal/group/#group_id#/", "G_MESSAGES_PATH_TO_MESSAGE_FORM" => "/company/personal/messages/form/#user_id#/", "G_MESSAGES_PATH_TO_MESSAGE_FORM_MESS" => "/company/personal/messages/form/#user_id#/#message_id#/", "G_MESSAGES_PATH_TO_MESSAGES_CHAT" => "/company/personal/messages/chat/#user_id#/", "G_MESSAGES_PATH_TO_SMILE" => "/bitrix/images/socialnetwork/smile/", "G_MESSAGES_AJAX_LONG_TIMEOUT" => "60", "G_MESSAGES_MESSAGE_VAR" => "message_id", "G_MESSAGES_PAGE_VAR" => "page", "G_MESSAGES_USER_VAR" => "user_id", "G_MESSAGES_INBOX_URL" => "/company/personal/messages/input/", "G_MESSAGES_SENT_URL" => "/company/personal/messages/output/", "GU_MESSAGES_TITLE_STD" => "", "G_CALENDAR_IBLOCK_TYPE" => "news", "G_CALENDAR_IBLOCK_ID" => "15", "G_CALENDAR_DETAIL_URL" => "/company/personal/user/#user_id#/calendar/", "G_CALENDAR_CACHE_TYPE" => "A", "G_CALENDAR_CACHE_TIME" => "3600", "G_CALENDAR_CALENDAR_URL" => "/company/personal/user/#user_id#/calendar/", "GU_CALENDAR_TITLE_STD" => "", "GU_CALENDAR_EVENTS_COUNT" => "5", "G_PROFILE_PATH_TO_GENERAL" => "/company/personal/", "G_PROFILE_PATH_TO_PROFILE_EDIT" => "/company/personal/user/#user_id#/edit/", "G_PROFILE_PATH_TO_LOG" => "/company/personal/log/", "G_PROFILE_PATH_TO_SUBSCR" => "/company/personal/subscribe/", "G_PROFILE_PATH_TO_MSG" => "/company/personal/messages/", "G_PROFILE_PATH_TO_GROUPS" => "/company/personal/user/#user_id#/groups/", "G_PROFILE_PATH_TO_GROUP_NEW" => "/company/personal/user/#user_id#/groups/create/", "G_PROFILE_PATH_TO_PHOTO" => "/company/personal/user/#user_id#/photo/", "G_PROFILE_PATH_TO_PHOTO_NEW" => "/company/personal/user/#user_id#/photo/photo/user_#user_id#/0/action/upload/", "G_PROFILE_PATH_TO_FORUM" => "/company/personal/user/#user_id#/forum/", "G_PROFILE_PATH_TO_BLOG" => "/company/personal/user/#user_id#/blog/", "G_PROFILE_PATH_TO_BLOG_NEW" => "/company/personal/user/#user_id#/blog/edit/new/", "G_PROFILE_PATH_TO_CAL" => "/company/personal/user/#user_id#/calendar/", "G_PROFILE_PATH_TO_TASK" => "/company/personal/user/#user_id#/tasks/", "G_PROFILE_PATH_TO_TASK_NEW" => "/company/personal/user/#user_id#/tasks/task/edit/0/", "G_PROFILE_PATH_TO_LIB" => "/company/personal/user/#user_id#/files/lib/", "GU_PROFILE_TITLE_STD" => "", "GU_PROFILE_SHOW_GENERAL" => "Y", "GU_PROFILE_SHOW_GROUPS" => "Y", "GU_PROFILE_SHOW_PHOTO" => "Y", "GU_PROFILE_SHOW_CAL" => "Y", "GU_PROFILE_SHOW_BLOG" => "Y", "GU_PROFILE_SHOW_TASK" => "Y", "GU_PROFILE_SHOW_LIB" => "Y", "G_SEARCH_EMPLOYEE_LIST_URL" => "/company/", "GU_SEARCH_EMPLOYEE_TITLE_STD" => "", "G_LIFE_IBLOCK_TYPE" => "news", "G_LIFE_IBLOCK_ID" => $_REQUEST["ID"], "G_LIFE_ACTIVE_DATE_FORMAT" => LANGUAGE_ID == "en" ? "F j, Y" : (LANGUAGE_ID == "de" ? "d.m.Y" : "d.m.Y"), "G_LIFE_LIST_URL" => "/about/life.php", "G_LIFE_DETAIL_URL" => "/about/life.php?ID=#ELEMENT_ID#", "G_LIFE_CACHE_TYPE" => "A", "G_LIFE_CACHE_TIME" => "36000000", "GU_LIFE_TITLE_STD" => "", "GU_LIFE_NEWS_COUNT" => "5", "GU_LIFE_DISPLAY_DATE" => "Y", "GU_LIFE_DISPLAY_PICTURE" => "Y", "GU_LIFE_DISPLAY_PREVIEW_TEXT" => "Y", "G_BLOG_PATH_TO_BLOG" => "/company/personal/user/#user_id#/blog/", "G_BLOG_PATH_TO_POST" => "/company/personal/user/#user_id#/blog/#post_id#/", "G_BLOG_PATH_TO_GROUP_BLOG_POST" => "/workgroups/group/#group_id#/blog/#post_id#/", "G_BLOG_PATH_TO_USER" => "/company/personal/user/#user_id#/", "G_BLOG_CACHE_TYPE" => "A", "G_BLOG_CACHE_TIME" => "180", "GU_BLOG_TITLE_STD" => "", "GU_BLOG_MESSAGE_COUNT" => "6", "GU_BLOG_MESSAGE_LENGTH" => "100", "GU_BLOG_DATE_TIME_FORMAT" => "#DATE_TIME_FORMAT#", "G_NEW_EMPLOYEES_LIST_URL" => "/company/events.php", "GU_NEW_EMPLOYEES_TITLE_STD" => "", "GU_NEW_EMPLOYEES_NUM_USERS" => "5", "GU_NEW_EMPLOYEES_DEPARTMENT" => "-", "G_UPDATES_USER_VAR" => "user_id", "G_UPDATES_GROUP_VAR" => "group_id", "G_UPDATES_PAGE_VAR" => "page", "G_UPDATES_PATH_TO_USER" => "/company/personal/user/#user_id#/", "G_UPDATES_PATH_TO_GROUP" => "/workgroups/group/#group_id#/", "G_UPDATES_LIST_URL" => "/company/personal/log/", "GU_UPDATES_TITLE_STD" => "", "GU_UPDATES_ENTITY_TYPE" => "", "GU_UPDATES_EVENT_ID" => "", "G_SHARED_DOCS_IBLOCK_TYPE" => "library", "G_SHARED_DOCS_IBLOCK_ID" => $_REQUEST["ID"], "G_SHARED_DOCS_LIST_URL" => "/docs/", "G_SHARED_DOCS_DETAIL_URL" => "/docs/shared/element/view/#ELEMENT_ID#/", "G_SHARED_DOCS_CACHE_TYPE" => "A", "G_SHARED_DOCS_CACHE_TIME" => "3600", "GU_SHARED_DOCS_TITLE_STD" => "", "GU_SHARED_DOCS_DOCS_COUNT" => "5", "GU_SHARED_DOCS_DISPLAY_DATE" => "Y", "GU_SHARED_DOCS_DISPLAY_PICTURE" => "Y", "GU_SHARED_DOCS_DISPLAY_PREVIEW_TEXT" => "Y", "G_ABSENT_LIST_URL" => "/company/absence.php", "GU_ABSENT_TITLE_STD" => "", "GU_ABSENT_NUM_USERS" => "5", "GU_ABSENT_DEPARTMENT" => "-", "G_REPORT1C_CACHE_TYPE" => "A", "G_REPORT1C_CACHE_TIME" => "0", "GU_REPORT1C_TITLE_STD" => "", "GU_REPORT1C_INITIALREPORT" => "shortreport", "GU_REPORT1C_URL" => "localhost", "GU_REPORT1C_PORT" => "8080", "GU_REPORT1C_PATH" => "/ws/report.1cws", "GU_REPORT1C_LOGIN" => "", "GU_REPORT1C_PASSWORD" => "", "G_OFFICIAL_IBLOCK_TYPE" => "news", "G_OFFICIAL_IBLOCK_ID" => $_REQUEST["ID"], "G_OFFICIAL_LIST_URL" => "/about/index.php", "G_OFFICIAL_DETAIL_URL" => "/about/official.php?ID=#ELEMENT_ID#", "G_OFFICIAL_ACTIVE_DATE_FORMAT" => LANGUAGE_ID == "en" ? "F j, Y" : (LANGUAGE_ID == "de" ? "d.m.Y" : "d.m.Y"), "G_OFFICIAL_CACHE_TYPE" => "A", "G_OFFICIAL_CACHE_TIME" => "36000000", "GU_OFFICIAL_TITLE_STD" => "", "GU_OFFICIAL_NEWS_COUNT" => "5", "GU_OFFICIAL_DISPLAY_PREVIEW_TEXT" => "Y", "G_PROBKI_CACHE_TIME" => "3600", "G_PROBKI_SHOW_URL" => "N", "GU_PROBKI_TITLE_STD" => "", "GU_PROBKI_CITY" => "c213", "G_WEATHER_CACHE_TIME" => "3600", "G_WEATHER_SHOW_URL" => "N", "GU_WEATHER_TITLE_STD" => "", "GU_WEATHER_CITY" => "c213", "G_WORKGROUPS_GROUP_VAR" => "group_id", "G_WORKGROUPS_PATH_TO_GROUP" => "/workgroups/group/#group_id#/", "G_WORKGROUPS_PATH_TO_GROUP_SEARCH" => "/workgroups/", "G_WORKGROUPS_CACHE_TIME" => "3600", "GU_WORKGROUPS_TITLE_STD" => "", "GU_WORKGROUPS_DATE_TIME_FORMAT" => LANGUAGE_ID == "en" ? "F j, Y H:i:s" : (LANGUAGE_ID == "de" ? "d.m.Y H:i:s" : "d.m.Y H:i:s"), "GU_WORKGROUPS_DISPLAY_PICTURE" => "Y", "GU_WORKGROUPS_DISPLAY_DESCRIPTION" => "Y", "GU_WORKGROUPS_DISPLAY_NUMBER_OF_MEMBERS" => "Y", "GU_WORKGROUPS_FILTER_MY" => "N", "G_COMPANY_CALENDAR_IBLOCK_TYPE" => "news", "G_COMPANY_CALENDAR_IBLOCK_ID" => "15", "G_COMPANY_CALENDAR_DETAIL_URL" => "/about/calendar.php", "G_COMPANY_CALENDAR_CACHE_TYPE" => "A", "G_COMPANY_CALENDAR_CACHE_TIME" => "3600", "GU_COMPANY_CALENDAR_TITLE_STD" => "", "GU_COMPANY_CALENDAR_EVENTS_COUNT" => "5", "G_CRM_COMPANY_LIST_PATH_TO_COMPANY_SHOW" => "#SITE_DIR#crm/company/show/#company_id#/", "GU_CRM_COMPANY_LIST_TITLE_STD" => "", "GU_CRM_COMPANY_LIST_TYPE_ID" => "", "GU_CRM_COMPANY_LIST_ONLY_MY" => "N", "GU_CRM_COMPANY_LIST_SORT" => "DATE_CREATE", "GU_CRM_COMPANY_LIST_SORT_BY" => "DESC", "GU_CRM_COMPANY_LIST_COMPANY_COUNT" => "5", "G_CRM_CONTACT_LIST_PATH_TO_CONTACT_SHOW" => "#SITE_DIR#crm/contact/show/#contact_id#/", "GU_CRM_CONTACT_LIST_TITLE_STD" => "", "GU_CRM_CONTACT_LIST_TYPE_ID" => "", "GU_CRM_CONTACT_LIST_ONLY_MY" => "N", "GU_CRM_CONTACT_LIST_SORT" => "DATE_CREATE", "GU_CRM_CONTACT_LIST_SORT_BY" => "DESC", "GU_CRM_CONTACT_LIST_CONTACT_COUNT" => "5", "G_CRM_LEAD_LIST_PATH_TO_LEAD_SHOW" => "#SITE_DIR#crm/lead/show/#lead_id#/", "GU_CRM_LEAD_LIST_TITLE_STD" => "", "GU_CRM_LEAD_LIST_STATUS_ID" => "", "GU_CRM_LEAD_LIST_ONLY_MY" => "N", "GU_CRM_LEAD_LIST_SORT" => "DATE_CREATE", "GU_CRM_LEAD_LIST_SORT_BY" => "DESC", "GU_CRM_LEAD_LIST_LEAD_COUNT" => "5", "G_CRM_DEAL_LIST_PATH_TO_DEAL_SHOW" => "#SITE_DIR#crm/deal/show/#deal_id#/", "GU_CRM_DEAL_LIST_TITLE_STD" => "", "GU_CRM_DEAL_LIST_STAGE_ID" => "", "GU_CRM_DEAL_LIST_ONLY_MY" => "N", "GU_CRM_DEAL_LIST_SORT" => "DATE_CREATE", "GU_CRM_DEAL_LIST_SORT_BY" => "DESC", "GU_CRM_DEAL_LIST_DEAL_COUNT" => "5", "G_CRM_EVENT_LIST_PATH_TO_LEAD_SHOW" => "#SITE_DIR#crm/lead/show/#lead_id#/", "G_CRM_EVENT_LIST_PATH_TO_CONTACT_SHOW" => "#SITE_DIR#crm/contact/show/#contact_id#/", "G_CRM_EVENT_LIST_PATH_TO_COMPANY_SHOW" => "#SITE_DIR#crm/company/show/#company_id#/", "G_CRM_EVENT_LIST_PATH_TO_DEAL_SHOW" => "#SITE_DIR#crm/deal/show/#deal_id#/", "GU_CRM_EVENT_LIST_TITLE_STD" => "", "GU_CRM_EVENT_LIST_EVENT_TYPE_LIST" => "", "GU_CRM_EVENT_LIST_EVENT_COUNT" => "5", "G_PHOTOS_IBLOCK_TYPE" => "news", "G_PHOTOS_IBLOCK_ID" => "", "G_PHOTOS_LIST_URL" => "/about/gallery/", "G_PHOTOS_DETAIL_URL" => "/about/gallery/#SECTION_ID#/#ELEMENT_ID#/", "G_PHOTOS_DETAIL_SLIDE_SHOW_URL" => "/about/gallery/#SECTION_ID#/#ELEMENT_ID#/slide_show/", "G_PHOTOS_CACHE_TYPE" => "A", "G_PHOTOS_CACHE_TIME" => "3600", "GU_PHOTOS_TITLE_STD" => "", "GU_PHOTOS_PAGE_ELEMENTS" => "6"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:11,代码来源:index.php

示例4: BuildPermSql

 public static function BuildPermSql($aliasPrefix = 'A', $permType = 'READ', $arOptions = array())
 {
     if (!is_array($arOptions)) {
         $arOptions = array();
     }
     $userPermissions = isset($arOptions['PERMS']) ? $arOptions['PERMS'] : null;
     $userID = $userPermissions !== null && is_object($userPermissions) ? $userPermissions->GetUserID() : 0;
     if (CCrmPerms::IsAdmin($userID)) {
         return '';
     }
     if (!CCrmPerms::IsAccessEnabled($userPermissions)) {
         // User does not have permissions at all.
         return false;
     }
     $entitiesSql = array();
     $permOptions = array_merge(array('IDENTITY_COLUMN' => 'OWNER_ID'), $arOptions);
     $entitiesSql[strval(CCrmOwnerType::Lead)] = CCrmLead::BuildPermSql($aliasPrefix, $permType, $permOptions);
     $entitiesSql[strval(CCrmOwnerType::Deal)] = CCrmDeal::BuildPermSql($aliasPrefix, $permType, $permOptions);
     $entitiesSql[strval(CCrmOwnerType::Contact)] = CCrmContact::BuildPermSql($aliasPrefix, $permType, $permOptions);
     $entitiesSql[strval(CCrmOwnerType::Company)] = CCrmCompany::BuildPermSql($aliasPrefix, $permType, $permOptions);
     $entitiesSql[strval(CCrmOwnerType::Invoice)] = CCrmInvoice::BuildPermSql($aliasPrefix, $permType, $permOptions);
     foreach ($entitiesSql as $entityTypeID => $entitySql) {
         if (!is_string($entitySql)) {
             //If $entityPermSql is not string - acces denied. Clear permission SQL and related records will be ignored.
             unset($entitiesSql[$entityTypeID]);
             continue;
         }
         if ($entitySql !== '') {
             $entitiesSql[$entityTypeID] = '(' . $aliasPrefix . '.OWNER_TYPE_ID = ' . $entityTypeID . ' AND (' . $entitySql . ') )';
         } else {
             // No permissions check - fetch all related records
             $entitiesSql[$entityTypeID] = '(' . $aliasPrefix . '.OWNER_TYPE_ID = ' . $entityTypeID . ')';
         }
     }
     //If $entitiesSql is empty - user does not have permissions at all.
     if (empty($entitiesSql)) {
         return false;
     }
     $userID = CCrmSecurityHelper::GetCurrentUserID();
     if ($userID > 0) {
         //Allow responsible user to view activity without permissions check.
         return $aliasPrefix . '.RESPONSIBLE_ID = ' . $userID . ' OR ' . implode(' OR ', $entitiesSql);
     } else {
         return implode(' OR ', $entitiesSql);
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:46,代码来源:crm_activity.php

示例5: array

        $arMenuCrm[] = array(GetMessage("MENU_CRM_COMPANY"), "#SITE_DIR#crm/company/", array(), array(), "");
    }
    if (!$CrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE)) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_DEAL"), "#SITE_DIR#crm/deal/", array(), array(), "");
    }
    if (!$CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE)) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_INVOICE"), "#SITE_DIR#crm/invoice/", array(), array(), "");
    }
    if (!$CrmPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE)) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_QUOTE"), "#SITE_DIR#crm/quote/", array(), array(), "");
    }
    if (!$CrmPerms->HavePerm('LEAD', BX_CRM_PERM_NONE)) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_LEAD"), "#SITE_DIR#crm/lead/", array(), array(), "");
    }
    $arMenuCrm[] = array(GetMessage("MENU_CRM_PRODUCT"), "#SITE_DIR#crm/product/", array(), array(), "");
    if (!$CrmPerms->HavePerm('LEAD', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('COMPANY', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE)) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_HISTORY"), "#SITE_DIR#crm/events/", array(), array(), "");
    }
    if (!$CrmPerms->HavePerm('LEAD', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('COMPANY', BX_CRM_PERM_NONE) || !$CrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE)) {
        if (IsModuleInstalled('report') || SITE_TEMPLATE_ID !== "bitrix24") {
            $arMenuCrm[] = array(GetMessage("MENU_CRM_REPORT"), CModule::IncludeModule('report') ? "#SITE_DIR#crm/reports/report/" : "#SITE_DIR#crm/reports/", array(), array(), "");
        }
        if (SITE_TEMPLATE_ID === "bitrix24") {
            $arMenuCrm[] = array(GetMessage("MENU_CRM_FUNNEL"), "#SITE_DIR#crm/reports/", array(), array(), "");
        }
    }
    if ($CrmPerms->IsAccessEnabled()) {
        $arMenuCrm[] = array(GetMessage("MENU_CRM_SETTINGS"), "#SITE_DIR#crm/configs/", array(), array(), "");
    }
    $aMenuLinks = array_merge($arMenuCrm, $aMenuLinks);
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:.left.menu_ext.php

示例6: ShowError

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    ShowError(GetMessage('CRM_MODULE_NOT_INSTALLED'));
    return;
}
if (!CModule::IncludeModule(CRM_MODULE_CALENDAR_ID)) {
    ShowError(GetMessage('CALENDAR_MODULE_NOT_INSTALLED'));
    return 0;
}
if (!CCrmPerms::IsAccessEnabled()) {
    ShowError(GetMessage('CRM_PERMISSION_DENIED'));
    return;
}
$arParams['PATH_TO_TASK_LIST'] = CrmCheckPath('PATH_TO_TASK_LIST', $arParams['PATH_TO_TASK_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_LEAD_SHOW'] = CrmCheckPath('PATH_TO_LEAD_SHOW', $arParams['PATH_TO_LEAD_SHOW'], $APPLICATION->GetCurPage() . '?lead_id=#lead_id#&show');
$arParams['PATH_TO_DEAL_SHOW'] = CrmCheckPath('PATH_TO_DEAL_SHOW', $arParams['PATH_TO_DEAL_SHOW'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&show');
$arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
$arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
$arParams['PATH_TO_USER_PROFILE'] = CrmCheckPath('PATH_TO_USER_PROFILE', $arParams['PATH_TO_USER_PROFILE'], '/company/personal/user/#user_id#/');
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
$arResult['ACTIVITY_ENTITY_LINK'] = isset($arParams['ACTIVITY_ENTITY_LINK']) && $arParams['ACTIVITY_ENTITY_LINK'] == 'Y' ? 'Y' : 'N';
CUtil::InitJSCore(array('ajax', 'tooltip'));
$CCrmActivity = new CCrmActivityTask();
$arParams['GRID_ID_SUFFIX'] = '';
$arResult['GADGET'] = 'N';
if (isset($arParams['GADGET_ID']) && strlen($arParams['GADGET_ID']) > 0) {
    $arResult['GADGET'] = 'Y';
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例7: CheckPermission

 function CheckPermission($arUserField, $userID = false)
 {
     //permission check is disabled
     if ($userID === false) {
         return true;
     }
     if (!CModule::IncludeModule('crm')) {
         return false;
     }
     $userID = intval($userID);
     $userPerms = $userID > 0 ? CCrmPerms::GetUserPermissions($userID) : CCrmPerms::GetCurrentUserPermissions();
     return CCrmPerms::IsAccessEnabled($userPerms);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:13,代码来源:crm_usertypecrm.php

示例8: define

<?php

define('STOP_STATISTICS', true);
define('BX_SECURITY_SHOW_MESSAGE', true);
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';
if (!CModule::IncludeModule('crm')) {
    return;
}
if (!CCrmSecurityHelper::IsAuthorized() || $_REQUEST['MODE'] != 'SEARCH') {
    return;
}
$bResultWithValue = isset($_REQUEST['RESULT_WITH_VALUE']) && $_REQUEST['RESULT_WITH_VALUE'] === 'Y';
$CrmPerms = CCrmPerms::GetCurrentUserPermissions();
if (!(CCrmPerms::IsAccessEnabled($CrmPerms) && $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ'))) {
    return;
}
__IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
CUtil::JSPostUnescape();
$GLOBALS['APPLICATION']->RestartBuffer();
$search = trim($_REQUEST['VALUE']);
$multi = isset($_REQUEST['MULTI']) && $_REQUEST['MULTI'] == 'Y' ? true : false;
$arData = array();
$enableSearchByID = true;
if (isset($_REQUEST['ENABLE_SEARCH_BY_ID'])) {
    $enableSearchByID = strtoupper($_REQUEST['ENABLE_SEARCH_BY_ID']) === 'Y';
}
if ($enableSearchByID && is_numeric($search)) {
    $arFilter['ID'] = (int) $search;
} elseif (preg_match('/(.*)\\[(\\d+?)\\]/i' . BX_UTF_PCRE_MODIFIER, $search, $arMatches)) {
    $arFilter['ID'] = intval($arMatches[2]);
    $arFilter['%NAME'] = trim($arMatches[1]);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:list.ajax.php

示例9: ShowError

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    ShowError(GetMessage('CRM_MODULE_NOT_INSTALLED'));
    return;
}
if (!(CCrmSecurityHelper::IsAuthorized() && CCrmPerms::IsAccessEnabled())) {
    ShowError(GetMessage('CRM_PERMISSION_DENIED'));
    return;
}
global $APPLICATION;
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array('#NOBR#', '#/NOBR#'), array('', ''), $arParams['NAME_TEMPLATE']);
$uid = isset($arParams['UID']) ? $arParams['UID'] : '';
if ($uid === '') {
    $uid = 'mobile_crm_config_user_email';
}
$arResult['UID'] = $arParams['UID'] = $uid;
$currentUserID = $arResult['USER_ID'] = CCrmSecurityHelper::GetCurrentUserID();
$dbUser = CUser::GetList($by = 'id', $order = 'asc', array('ID_EQUAL_EXACT' => $currentUserID), array('FIELDS' => array('LOGIN', 'NAME', 'SECOND_NAME', 'LAST_NAME', 'EMAIL', 'PERSONAL_PHOTO')));
$user = $dbUser->Fetch();
$contextID = isset($arParams['CONTEXT_ID']) ? $arParams['CONTEXT_ID'] : '';
if ($contextID === '' && isset($_REQUEST['context_id'])) {
    $contextID = $_REQUEST['context_id'];
}
$arResult['CONTEXT_ID'] = $contextID;
$arResult['CRM_EMAIL'] = CCrmMailHelper::ExtractEmail(COption::GetOptionString('crm', 'mail', ''));
$arResult['USER_FULL_NAME'] = CUser::FormatName($arParams['NAME_TEMPLATE'], array('LOGIN' => isset($user['LOGIN']) ? $user['LOGIN'] : '', 'NAME' => isset($user['NAME']) ? $user['NAME'] : '', 'SECOND_NAME' => isset($user['SECOND_NAME']) ? $user['SECOND_NAME'] : '', 'LAST_NAME' => isset($user['LAST_NAME']) ? $user['LAST_NAME'] : ''), true, false);
$arResult['USER_EMAIL'] = isset($user['EMAIL']) ? $user['EMAIL'] : '';
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例10: GetMessage

echo GetMessage("MB_MESSAGES");
?>
</div>
		<div class="menu-item menu-item-wrap menu-icon-employees"
			onclick="userList();"><?php 
echo GetMessage("MB_COMPANY");
?>
</div>
		<div class="menu-item menu-item-wrap menu-icon-files" id="doc_shared"
			onclick="webdavList('shared/');"><?php 
echo GetMessage("MB_SHARED_FILES_MAIN_MENU_ITEM_NEW");
?>
</div>
	</div>
	<?php 
if (IsModuleInstalled('crm') && CModule::IncludeModule('crm') && CCrmPerms::IsAccessEnabled()) {
    $userPerms = CCrmPerms::GetCurrentUserPermissions();
    ?>
		<div class="menu-separator">CRM</div>
		<div class="menu-section">
			<div class="menu-item menu-item-wrap menu-icon-mybusiness" id="crm_activity_list"
				data-url="/mobile/crm/activity/list.php"
				data-pageid="crm_activity_list"><?php 
    echo htmlspecialcharsbx(GetMessage('MB_CRM_ACTIVITY'));
    ?>
</div>
			<?php 
    if (!$userPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE, 'READ')) {
        ?>
				<div class="menu-item menu-item-wrap menu-icon-contacts" id="crm_contact_list"
					data-url="/mobile/crm/contact/list.php"
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:template.php

示例11: define

require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';
if (!defined('LANGUAGE_ID')) {
    $dbSite = CSite::GetByID(SITE_ID);
    $arSite = $dbSite ? $dbSite->Fetch() : null;
    define('LANGUAGE_ID', $arSite ? $arSite['LANGUAGE_ID'] : 'en');
}
//session_write_close();
if (!CModule::IncludeModule('crm')) {
    die;
}
if (CModule::IncludeModule('compression')) {
    CCompress::Disable2048Spaces();
}
global $APPLICATION, $DB;
$curUser = CCrmSecurityHelper::GetCurrentUser();
if (!$curUser || !$curUser->IsAuthorized() || !check_bitrix_sessid() || !CCrmPerms::IsAccessEnabled() || $_SERVER['REQUEST_METHOD'] != 'POST') {
    die;
}
//$langID = isset($_REQUEST['lang_id'])? $_REQUEST['lang_id']: LANGUAGE_ID;
//__IncludeLang(dirname(__FILE__).'/lang/'.$langID.'/'.basename(__FILE__));
CUtil::JSPostUnescape();
if (!function_exists('__CrmMobileProductRowEditEndResonse')) {
    function __CrmMobileProductRowEditEndResonse($result)
    {
        $GLOBALS['APPLICATION']->RestartBuffer();
        Header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET);
        if (!empty($result)) {
            echo CUtil::PhpToJSObject($result);
        }
        require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_after.php';
        die;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:ajax.php


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