Enable login by role both on frontend and backend
This commit is contained in:
@@ -6,14 +6,6 @@
|
||||
* General functions for updating wiaas database to latest version
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Enable restricting visibility by user roles for products
|
||||
*/
|
||||
function wiaas_db_update_enable_product_by_user_role() {
|
||||
update_option('wcj_product_by_user_role_enabled', 'yes');
|
||||
}
|
||||
|
||||
function wiaas_db_update_setup_gravity() {
|
||||
// Gravity Form settings
|
||||
update_option('gform_pending_installation', false);
|
||||
@@ -145,4 +137,12 @@ function wiaas_db_setup_create_customer_commercial_lead_table() {
|
||||
";
|
||||
|
||||
dbDelta( $sql );
|
||||
}
|
||||
|
||||
|
||||
function wiaas_create_organization_roles_capabilities() {
|
||||
$roles = array( 'commercial_lead', 'supplier', 'customer', 'administrator');
|
||||
foreach ($roles as $role) {
|
||||
Groups_Capability::create( array( 'capability' => 'wiaas_' . $role ));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user