Merge "Improvements in error messages"

This commit is contained in:
Jenkins 2016-11-23 03:59:51 +00:00 committed by Gerrit Code Review
commit 6a67937b87
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(