本文整理匯總了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.
}
}
示例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;
}
}
示例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.
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}