本文整理汇总了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;
}
}