handle user roles by organization

This commit is contained in:
Almira Krdzic
2018-10-11 04:16:43 +02:00
parent 9a8e05e341
commit 84cd11f9c9
29 changed files with 1341 additions and 124 deletions

View File

@@ -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;
}
/**