Bug 1007928 - File Explorer: allows to open and edit files, changes cannot be saved
File Explorer: allows to open and edit files, changes cannot be saved
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER5
: 6.0.0
Assigned To: Toni Rikkola
Zuzana Krejčová
:
Depends On:
Blocks: bpms6_ux/brms6_ux
  Show dependency treegraph
 
Reported: 2013-09-13 10:59 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:08 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:16:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2013-09-13 10:59:00 EDT
Description of problem:
You can open an editor for pom.xml (see bug 1007276), kmodule.xml, project.imports, .gitignore, .pom.xml, .kmodule.xml and .project.imports. You can make changes there (only revert to previous version for project.imports) but you are not allowed to save them.

It should not be possible to edit a file that cannot be saved. These files should be opened in a read-only mode.
Comment 1 Toni Rikkola 2013-09-16 02:58:28 EDT
This got fixed as a side product of "996880 - Project screen: Source not working". Clicking kmodule.xml now opens a text editor that allows hard editing of the file.
Comment 2 Toni Rikkola 2013-09-16 04:04:49 EDT
Actually taking this back, since the dot files still need to be managed.
Comment 3 Edson Tirelli 2013-09-16 16:31:25 EDT
This is not a blocker and also we need to discuss if we should or not allow . files to be editable in the UI, since they contain sensitive metadata.
Comment 4 Prakash Aradhya 2013-09-16 22:18:43 EDT
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA
Comment 5 Zuzana Krejčová 2013-09-17 04:30:48 EDT
(In reply to Edson Tirelli from comment #3)
> This is not a blocker and also we need to discuss if we should or not allow
> . files to be editable in the UI, since they contain sensitive metadata.

I agree that editing .pom.xml, .kmodule.xml and .project.imports should not be allowed - users have no reason to make any changes in there. 
I'm not so sure about .gitignore - that could be nice to have editable, for more technical folks probably.
As for project.imports file, see bug 1008859 - it's now blank. But once it shows something, it should behave the same as pom.xml and kmodule.xml, I think.
Comment 6 Toni Rikkola 2013-10-01 06:51:04 EDT
I understand what you are after with this. I don't want the non-technical people breaking the dot files either.

And here comes the but. Kie-wb contains several perspectives. The file explorers in Author perspective hide all the dot files and the Administration perspective shows them. So I feel that we have a clear separation between the users that know not to touch dot files and the people who do not understand them.

With this separation I don't think it is a problem that the admin level user can open and even edit the files. If we take the approach that the user should not be able to edit these files then I think we should also prevent the users from editing these files with doing a direct git clone and pushing changes back to kie-wb.

Also something to keep in mind, each file in kie-wb has a dot file. To block dot file editing means the dot files can not be edited by default and we make a white list for the files that can be edited.

Since I feel that what we now have works and "fixing" the dot file issue actually causes a lot more trouble than it might fix. I propose that we close this ticket.
Comment 7 Zuzana Krejčová 2013-10-01 08:35:26 EDT
(In reply to Toni Rikkola from comment #6)

The file explorer from Administration perspective is also available in the Asset Repository perspective, that makes the separation a bit less clear I think.

Would it be hard to filter all files starting with a dot and by default open them in some kind of a read-only editor? There's only the .gitignore that seems reasonable to allow editing, but business folks probably wouldn't need to use it anyway. This would mean no need for a white list, right?

Anyway - please don't close this as long as it is possible to edit these files but not to save the changes. I think the dot files should be read-only, but if you decide to allow editing, also add the possibility to save it.
Comment 11 Toni Rikkola 2013-10-08 09:07:53 EDT
Ok, dot files now open into dot file editor (same as the text editor). The dot file editor only allows editing for admins. Any other user gets the editor without the save menu and with a text area that can not be changed.

This only prevents the non admins from editing the dot files if they use the dot file editor. The dot file editor is the default editor for dot files.
Comment 12 Zuzana Krejčová 2013-12-10 05:15:05 EST
The one issue left is the project.imports file - covered now in bug 1039916. As the rest is fixed, I'm marking this as verified.

Note You need to log in before you can comment on or make changes to this bug.