Improvements in error messages

Minor improvements in trust/controllers.py error messages.

Change-Id: I273c470c140e2ac94d98374586113da36ad88efa
This commit is contained in:
Rodrigo Duarte Sousa 2016-11-22 09:16:14 -03:00 committed by Steve Martinelli
parent 1e6f78013f
commit 03319d1ab9
1 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ class TrustV3(controller.V3Controller):
self.assert_admin(request)
trusts += self.trust_api.list_trusts()
action = _('list trusts for another user')
action = _('Cannot list trusts for another user')
if trustor_user_id:
if trustor_user_id != request.context.user_id:
raise exception.Forbidden(action=action)
@ -227,7 +227,7 @@ class TrustV3(controller.V3Controller):
if (request.context.user_id != trust.get('trustor_user_id') and
not request.context.is_admin):
action = _('Only admin or trustor can delete the trust')
action = _('Only admin or trustor can delete a trust')
raise exception.ForbiddenAction(action=action)
self.trust_api.delete_trust(