Bug 1007928 - File Explorer: allows to open and edit files, changes cannot be saved
Summary: File Explorer: allows to open and edit files, changes cannot be saved
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.0.0
Assignee: Toni Rikkola
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks: bpms6_ux, brms6_ux
TreeView+ depends on / blocked
 
Reported: 2013-09-13 14:59 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:16:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1007276 0 unspecified CLOSED Changes to pom.xml cannot be saved 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1039916 0 high CLOSED Editor for project.imports file incomplete, Restore button saves 2021-02-22 00:41:40 UTC

Internal Links: 1007276 1039916

Description Zuzana Krejčová 2013-09-13 14:59:00 UTC
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 06:58:28 UTC
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 08:04:49 UTC
Actually taking this back, since the dot files still need to be managed.

Comment 3 Edson Tirelli 2013-09-16 20:31:25 UTC
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-17 02:18:43 UTC
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA

Comment 5 Zuzana Krejčová 2013-09-17 08:30:48 UTC
(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 10:51:04 UTC
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 12:35:26 UTC
(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 13:07:53 UTC
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 10:15:05 UTC
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.