handle user roles by organization
This commit is contained in:
@@ -157,15 +157,11 @@ class Wiaas_Pricing {
|
||||
* Determines if customer and commercial lead are in the same company
|
||||
* For now this is hardcoded and we have only one CL
|
||||
*
|
||||
* TODO: This should be changed after customer leads are handled
|
||||
* TODO: This will be handled in next PR for setting commercial lead prices
|
||||
* @return bool
|
||||
*/
|
||||
private static function _is_customer_same_company_as_cl() {
|
||||
$current_user = wp_get_current_user();
|
||||
$user_organization = Wiaas_User_Organization::get_user_organization($current_user->ID);
|
||||
$is_same_company_as_cl = $user_organization->name === self::COMMERCIAL_LEAD_NAME;
|
||||
|
||||
return $is_same_company_as_cl;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user