Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

WHISTLE-1201: until final roll out ignore pvt_enabled

  • Loading branch information...
commit 2d8c39e2315584267097f0774565d66972835d57 1 parent c9022b4
bitbashing k-anderson authored
Showing with 19 additions and 17 deletions.
  1. +19 −17 lib/whistle-1.0.0/src/wh_util.erl
36 lib/whistle-1.0.0/src/wh_util.erl
View
@@ -164,23 +164,25 @@ is_system_admin(Account) ->
is_account_enabled(undefined) ->
true;
is_account_enabled(AccountId) ->
- case wh_cache:peek({?MODULE, is_account_enabled, AccountId}) of
- {ok, Enabled} ->
- lager:debug("account ~s enabled flag is ~s", [AccountId, Enabled]),
- Enabled;
- {error, not_found} ->
- case couch_mgr:open_doc(?WH_ACCOUNTS_DB, AccountId) of
- {ok, JObj} ->
- PvtEnabled = wh_json:is_false(<<"pvt_enabled">>, JObj) =/= true,
- lager:debug("account ~s enabled flag is ~s", [AccountId, PvtEnabled]),
- wh_cache:store({?MODULE, is_account_enabled, AccountId}, PvtEnabled, 300),
- PvtEnabled;
- {error, R} ->
- lager:debug("unable to find enabled status of account ~s: ~p", [AccountId, R]),
- wh_cache:store({?MODULE, is_account_enabled, AccountId}, true, 300),
- true
- end
- end.
+ %% See WHISTLE-1201
+ true.
+%% case wh_cache:peek({?MODULE, is_account_enabled, AccountId}) of
+%% {ok, Enabled} ->
+%% lager:debug("account ~s enabled flag is ~s", [AccountId, Enabled]),
+%% Enabled;
+%% {error, not_found} ->
+%% case couch_mgr:open_doc(?WH_ACCOUNTS_DB, AccountId) of
+%% {ok, JObj} ->
+%% PvtEnabled = wh_json:is_false(<<"pvt_enabled">>, JObj) =/= true,
+%% lager:debug("account ~s enabled flag is ~s", [AccountId, PvtEnabled]),
+%% wh_cache:store({?MODULE, is_account_enabled, AccountId}, PvtEnabled, 300),
+%% PvtEnabled;
+%% {error, R} ->
+%% lager:debug("unable to find enabled status of account ~s: ~p", [AccountId, R]),
+%% wh_cache:store({?MODULE, is_account_enabled, AccountId}, true, 300),
+%% true
+%% end
+%% end.
%%--------------------------------------------------------------------
%% @public
Please sign in to comment.
Something went wrong with that request. Please try again.