Skip to content

Commit

Permalink
UI-1944: Hide faxing on trial accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
JRMaitre committed Jan 19, 2016
1 parent 5ca5be3 commit 2bee866
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions js/lib/monster.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,19 @@ define(function(require){
return isSuperDuper;
},

// Function returning if an account is in trial or not
isTrial: function(pAccount) {
var self = this,
isTrial = false,
account = pAccount || (monster.apps.hasOwnProperty('auth') && monster.apps.auth.hasOwnProperty('originalAccount') ? monster.apps.auth.originalAccount : {});

if(account.hasOwnProperty('trial_time_left')) {
isTrial = true;
}

return isTrial;
},

// Function returning if an account is a superduper admin, uses original account by default, but can take an account document in parameter
isWhitelabeling: function() {
return monster.config.whitelabel.hasOwnProperty('domain') && monster.config.whitelabel.domain.length > 0;
Expand Down

0 comments on commit 2bee866

Please sign in to comment.