function uc_extra_fields_pane_access in Extra Fields Checkout Pane 7
Same name and namespace in other branches
- 6.2 uc_extra_fields_pane.module \uc_extra_fields_pane_access()
Check if user has access to this field.
Users that don't have the permission "use php fields" may not edit fields of this type.
Parameters
UCXF_Field $field: The field for which access is requested.
string $op: The operation that is performed on the field.
Return value
boolean
1 call to uc_extra_fields_pane_access()
- uc_extra_fields_pane_preprocess_table in ./
uc_extra_fields_pane.module - Alters the uc_store_address_fields_form table.
1 string reference to 'uc_extra_fields_pane_access'
- uc_extra_fields_pane_menu in ./
uc_extra_fields_pane.module - Implements hook_menu().
File
- ./
uc_extra_fields_pane.module, line 124 - Module: uc_extra_fields_pane.module
Code
function uc_extra_fields_pane_access(UCXF_Field $field, $op) {
switch ($op) {
case 'edit':
switch ($field->value_type) {
case UCXF_Field::UCXF_WIDGET_TYPE_PHP:
case UCXF_Field::UCXF_WIDGET_TYPE_PHP_SELECT:
return user_access('use php fields');
}
break;
}
return user_access('administer store');
}