Edit other users diagrams in draw.io

Daniel Jeffery November 12, 2013

I need for individuals other than the original diagram creator to be able to edit a diagram. I have experimented with several different permissions settings, but the diagram is treated as an attachment and there are no permission settings for editing attachments. I can give everyone the ability to delete it, just not to edit it. The original creator is able to edit the attachment, but the edit icon is grayed out for other users. I am using version 1.2.3

Suggestions on how I can overcome this?

3 answers

1 accepted

1 vote
Answer accepted
Boris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2013

Currently, we allow users to edit the diagram if any of the following conditions are met :

  1. user is the author of the diagram
  2. user is the reporter of the issue
  3. user is the assignee for the issue

We're open to suggestions on permission handling as long as they make sense.

Update

As of 4.0.0.0 edit permissions have been reworked. In order to be able to edit the diagram, user must have attachment deletion permissions.

This is because JIRA API does not properly support updates to attachments contents. Only create and delete operations are supported by the API.

MarkoR February 1, 2014

Dear Boris,

Is there a posibility expand permission to use user custom field? For example users in user custom field 'Technical Writers' are able to edit / add diagrams? Tho, that would require some configuration UI.

Kind regards.

James Mark Chan June 22, 2015

We are having the same issue where we are not able to edit other user's diagrams with drawio in Jira. Basically we were hoping that by assigning the issue to a user will allow that user will be able to edit the diagram but we have found this is not the case with our install. Any help or advice will be greatly appreciated. We have purchased the starter plugin for confluence but have not gotten around to installing it yet. We are thinking the alternative is to collaborate with attaching Visio diagrams or we can start looking into Gliffy. FYI - we are using drawio 4.1.0.0 with version 6.0.5 of jira.

Boris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2015

I've updated my answer.

Dieter Guthmann July 3, 2019

JIRA does support 'versioning' for Attachments.

I don't understand why the draw.io Plugin deletes the old versions of the diagrams. If a new file with the same name is added there will be created a new version of this file. So no one would need the "Delete all attachments"-Permission to edit Diagrams from other users.

David Benson _draw_io_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 3, 2019

There is no "update attachment" API call, at least, not when we last checked. Only, add and delete.

Dieter Guthmann July 4, 2019

Via REST-API it simply works via adding a file with the same name again and again... JIRA then creates then a new version every time a new file is uploaded.

David Benson _draw_io_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 4, 2019

We make the create attachment call server-side, using AttachmentManager, https://docs.atlassian.com/software/jira/docs/api/8.0.3/com/atlassian/jira/issue/AttachmentManager.html.

I tested, but there's no way to do this server-side.

Client-side, are you certain these are new revisions of the same attachment, not new attachments with the same name? https://jira.atlassian.com/browse/JRASERVER-5963 suggests that Jira Server does not have attachment revisioning.

https://jira.atlassian.com/browse/JRASERVER-2169 eludes to the same problem. I assume you've tested making more than one REST API call to add an attachment with the same name? How did you confirm that the attachment had been updated in-place, instead of a new attachment created? i.e. what are the steps for me to reproduce?

Dieter Guthmann July 4, 2019

Yes, I tested it via doing multiple REST API calls.

curl -D- -u jirauser:password -X POST -H "X-Atlassian-Token: no-check" -F "file=@foobar" https://YOURJIRAMACHINE/rest/api/2/issue/ISSUEKEY/attachments

In fact, uploading multiple files with identical name creates always new attachments. Nothing is deleted and nothing is 'updated'... JIRA simply allows to upload files with the same filename and creates always a new attachment-'Version' - in fact a new attachment with the same name - displaying them as multiple Versions.

David Benson _draw_io_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2019

So, 100 versions of the diagram would show 100 attachments to the issue? That's just wrong, users would hate this.

Dieter Guthmann July 5, 2019

Currently our users don't like, that they cannot edit Draw.IO-Diagrams which were initially created by other users... the discussion in our company is to uninstall Draw.IO-Plugin because of that flaw.

We don't want to grant every user to delete all attachments in arbitray projects (JIRA permission Delete All Attachments vs. Delete Own Attachments).
The Solution for the Draw.IO-Plugin could be the following:

The Draw.IO-Plugin querys JIRA if the User has the permission to delete the previous attachment. If that's allowed Draw.IO offers 'Save Diagramm without new version" - otherwise Draw.IO creates a new Version.

David Benson _draw_io_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2019

We've added an item, https://trello.com/c/hWSUq7Eb/25-can-we-have-versioning-without-lots-of-attachments-visible, to investigate. Basically, there would need to be a method to hide the multiple attachments from the UI for us to be able to use it.

1 vote
Wouter Lauret May 15, 2015

user is the assignee for the issue

For me this doesn't work. Also the reporter right makes no difference. I can only edit if I am author, or administrator

James Mark Chan June 22, 2015

I have same issue. What type of administrator do i have to become to use this as a temporary work around? This almost seems like a deal breaker when dealing with wiki like technologies because you want regular users to be able to contribute to drawings. FYI - we are using drawio 4.1.0.0 with version 6.0.5 of jira.

1 vote
Daniel Jeffery November 12, 2013

Thanks, Boris. I couldn't find that documented anywhere and hadn't tried all those permutations yet.

It seems like adding a permission for "edit all attachments" or "edit all draw.io attachments" permission would be JIRA-friendly way of handling this.

Suggest an answer

Log in or Sign up to answer