當前位置: 首頁>>代碼示例>>PHP>>正文


PHP module_security::can_user_with_options方法代碼示例

本文整理匯總了PHP中module_security::can_user_with_options方法的典型用法代碼示例。如果您正苦於以下問題:PHP module_security::can_user_with_options方法的具體用法?PHP module_security::can_user_with_options怎麽用?PHP module_security::can_user_with_options使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在module_security的用法示例。


在下文中一共展示了module_security::can_user_with_options方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_invoice_access_permissions

 public static function get_invoice_access_permissions()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Invoice Data Access', array(_INVOICE_ACCESS_ALL, _INVOICE_ACCESS_JOB, _INVOICE_ACCESS_STAFF, _INVOICE_ACCESS_CUSTOMER));
     } else {
         return _INVOICE_ACCESS_ALL;
         // default to all permissions.
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:9,代碼來源:invoice.php

示例2: get_file_data_access

 public static function get_file_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'File Data Access', array(_FILE_ACCESS_ALL, _FILE_ACCESS_CUSTOMERS, _FILE_ACCESS_JOBS, _FILE_ACCESS_ME, _FILE_ACCESS_ASSIGNED));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:file.php

示例3: get_job_task_access_permissions

 public static function get_job_task_access_permissions()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Job Task Data Access', array(_JOB_TASK_ACCESS_ALL, _JOB_TASK_ACCESS_ASSIGNED_ONLY));
     } else {
         return _JOB_TASK_ACCESS_ALL;
         // default to all permissions.
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:9,代碼來源:job.php

示例4: get_company_data_access

 public static function get_company_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Company Data Access', array(_COMPANY_ACCESS_ALL, _COMPANY_ACCESS_ASSIGNED, _COMPANY_ACCESS_CONTACT));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:company.php

示例5: get_customer_data_access

 public static function get_customer_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Customer Data Access', array(_CUSTOMER_ACCESS_ALL, _CUSTOMER_ACCESS_ALL_COMPANY, _CUSTOMER_ACCESS_CONTACTS, _CUSTOMER_ACCESS_TASKS, _CUSTOMER_ACCESS_STAFF));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:customer.php

示例6: get_calendar_data_access

 public static function get_calendar_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Calendar Data Access', array(_CALENDAR_ACCESS_ALL, _CALENDAR_ACCESS_ASSIGNED));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:calendar.php

示例7: get_user_data_access

 public static function get_user_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'User Account Access', array(_USER_ACCESS_ALL, _USER_ACCESS_ME, _USER_ACCESS_CONTACTS));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:user.php

示例8: get_vendor_data_access

 public static function get_vendor_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Vendor Data Access', array(_VENDOR_ACCESS_ALL, _VENDOR_ACCESS_ALL_COMPANY, _VENDOR_ACCESS_CONTACTS));
     } else {
         return true;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:vendor.php

示例9: get_ticket_data_access

 public static function get_ticket_data_access()
 {
     if (class_exists('module_security', false)) {
         return module_security::can_user_with_options(module_security::get_loggedin_id(), 'Ticket Access', array(_TICKET_ACCESS_ALL, _TICKET_ACCESS_ASSIGNED, _TICKET_ACCESS_CREATED, _TICKET_ACCESS_CUSTOMER));
     } else {
         return _TICKET_ACCESS_ALL;
     }
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:8,代碼來源:ticket.php


注:本文中的module_security::can_user_with_options方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。