Improvements in error messages
Minor improvements in trust/controllers.py error messages. Change-Id: I273c470c140e2ac94d98374586113da36ad88efa
This commit is contained in:
parent
1e6f78013f
commit
03319d1ab9
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue