Reply To: Prevent Users from Adding Extra Fields

We're upgrading our support forum. Replies are currently closed. Please view our Documentation and FAQ using the menu above.

At the moment it is setup if the user has permissions to create new customers they will also have the permission to create new fields.

This is based on the following code (includes/plugin_customer/pages/customer_admin_edit.php)

module_extra::display_extras(array(
                            'owner_table' => 'customer',
                            'owner_key' => 'customer_id',
                            'owner_id' => $customer_id,
                            'layout' => 'table_row',
                                 'allow_new' => module_customer::can_i('create','Customers'),
                                 'allow_edit' => module_customer::can_i('create','Customers'),
                            )
                        );

You could change

'allow_new' => module_customer::can_i('create','Customers'),

to

'allow_new' => module_customer::can_i('create','Customer Extra'),

and that will give a new permission to control who can create new customer extra fields.

Repeat the process for other areas of the system.

dtbakerReply To: Prevent Users from Adding Extra Fields