Clarification of copy RBAC messages

This commit is contained in:
AlanCoding
2017-01-10 18:17:12 -05:00
parent 8796af7e28
commit e69dc0f36e
2 changed files with 6 additions and 4 deletions

View File

@@ -2910,6 +2910,8 @@ class WorkflowJobTemplateCopy(WorkflowsEnforcementMixin, GenericAPIView):
copy_TF, messages = request.user.can_access_with_errors(self.model, 'copy', obj)
data['can_copy'] = copy_TF
data['warnings'] = messages
if not copy_TF:
data['warnings'] = _('You do not have permission to make a copy.')
return Response(data)
def post(self, request, *args, **kwargs):