Skip to content

Commit

Permalink
Use _get_mask_secrets in actionexecutions
Browse files Browse the repository at this point in the history
  • Loading branch information
manasdk committed Jun 16, 2016
1 parent c6e5d90 commit 35701dd
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions st2api/st2api/controllers/v1/actionexecutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,7 @@ def _get_from_model_kwargs_for_request(self, request):
"""
Set mask_secrets=False if the user is an admin and provided ?show_secrets=True query param.
"""
from_model_kwargs = {'mask_secrets': cfg.CONF.api.mask_secrets}

show_secrets = self._get_query_param_value(request=request,
param_name=SHOW_SECRETS_QUERY_PARAM,
param_type='bool',
default_value=False)

if show_secrets and request_user_is_admin(request=request):
from_model_kwargs['mask_secrets'] = False

return from_model_kwargs
return {'mask_secrets': self._get_mask_secrets(request)}

def _handle_schedule_execution(self, liveaction_api):
"""
Expand Down

0 comments on commit 35701dd

Please sign in to comment.