Bug 103619 - Wrong Behaviour if You Try to Edit a Template which is Read-Only
Summary: Wrong Behaviour if You Try to Edit a Template which is Read-Only
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: possibleRegression
Depends on:
Blocks: Template-Manager Read-Only
  Show dependency treegraph
 
Reported: 2016-11-01 14:28 UTC by Harald Koester
Modified: 2018-02-20 11:30 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2016-11-01 14:28:15 UTC
Description:
See "Steps to Reproduce".

Steps to Reproduce:
[1] Ensure, that you are a user without admin rights on your system. In this case the predefined templates are read-only.
[2] Open Template Manager: File > New > Templates.
[3] Template filter: Select “Documents, Business Correspondence”. Two templates should be displayed: “Moderate” and “Modern” business letter.
[4] Right click one of the templates: A context menu is displayed.
[5] Select “Edit”. The Template Manager is closed. 

Actual Results:  
See "Steps to Reproduce".

Expected Results:
(a) Either at step 4 the menu entry “Edit” should be greyed 
(b) or at step 5 an error message should be displayed, that informs the user that the template is read-only. Also the Template Manager should not be closed at step 5
(c) or the template is opened as read-only. This is the function of the old template manager (version 5.1.5).


Reproducible: Always

User Profile Reset: No

Additional Info:
Hence the function was OK in version 5.1.5, this bug is a regression.


User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Buovjaga 2016-11-16 11:26:31 UTC
(In reply to Harald Koester from comment #0)
> (c) or the template is opened as read-only. This is the function of the old
> template manager (version 5.1.5).

I get this result.

Please test with 5.3

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha1+
Build ID: c5f5b3e5334c52502c1de28828a44ad469c68850
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-11-14_06:24:21
Locale: fi-FI (fi_FI); Calc: group
Comment 2 Regina Henschel 2016-12-12 18:08:07 UTC
The problem is still present in Version 5.4.

I see the problem if the file/folder is write-protected in the security settings tab of its properties in Windows 7.

The error is not, that LibreOffice does not allow editing, but that LibreOffice does not inform the user, why nothing happens.
Comment 3 Yousuf Philips (jay) (retired) 2017-04-28 12:56:28 UTC
(In reply to Harald Koester from comment #0)
> Expected Results:
> (a) Either at step 4 the menu entry “Edit” should be greyed 

No this shouldnt be greyed.

> (b) or at step 5 an error message should be displayed, that informs the user
> that the template is read-only. Also the Template Manager should not be
> closed at step 5

Yes the template manager should be closed after a template is opened.

> (c) or the template is opened as read-only. This is the function of the old
> template manager (version 5.1.5).

The read-only infobar used to appear, but the user still would click 'Edit Document' to edit the template, so it is an unnecessary step for a user.

I dont see the problem here, as saving the template would put the template in the user rights template folder.
Comment 4 Aron Budea 2017-06-28 15:17:00 UTC
(In reply to Yousuf Philips (jay) from comment #3)
> (In reply to Harald Koester from comment #0)
> > Expected Results:
> > (a) Either at step 4 the menu entry “Edit” should be greyed 
> 
> No this shouldnt be greyed.

There should be some kind of visual cue that the template is read only, and the action shouldn't be called "Edit", but "Edit copy" (or something with better wording).

> I dont see the problem here, as saving the template would put the template
> in the user rights template folder.

Does it? I'm looking at LO packaged with Ubuntu 17.04 (so not the freshest one, but 5.3.1), and when edit a built-in template (it's possible in Linux), then when I save it, the save dialog starts in /usr/lib/libreoffice/share/template/common/presnt.
Comment 5 Yousuf Philips (jay) (retired) 2017-07-01 11:05:20 UTC
(In reply to Aron Budea from comment #4)
> There should be some kind of visual cue that the template is read only, and
> the action shouldn't be called "Edit", but "Edit copy" (or something with
> better wording).

Having a different wording doesnt changed the behaviour of what LO does when it opens the template for editing, so an alternative wording will only be confusing.

> Does it? I'm looking at LO packaged with Ubuntu 17.04 (so not the freshest
> one, but 5.3.1), and when edit a built-in template (it's possible in Linux),
> then when I save it, the save dialog starts in
> /usr/lib/libreoffice/share/template/common/presnt.

If you File > Templates > Save as Template, so the newly modified template will appear in the template manager, it will save it into ~/Templates/, but yes if you File > Save of the read-only template, then it will show the save dialog at the path the original template was located.
Comment 6 Aron Budea 2017-07-01 12:49:24 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> (In reply to Aron Budea from comment #4)
> > There should be some kind of visual cue that the template is read only, and
> > the action shouldn't be called "Edit", but "Edit copy" (or something with
> > better wording).
> 
> Having a different wording doesnt changed the behaviour of what LO does when
> it opens the template for editing, so an alternative wording will only be
> confusing.

Right, the behavior should be adjusted as well.
Similarly, Save on a read-only template should direct to the user's template directory.
Comment 7 Yousuf Philips (jay) (retired) 2017-07-01 19:35:51 UTC
(In reply to Aron Budea from comment #6)
> Right, the behavior should be adjusted as well.

I wouldnt be infavour of changing the behaviour, but what behaviour would you change it to?

> Similarly, Save on a read-only template should direct to the user's template
> directory.

I wouldnt change this, as alot of variables can come into play, the most simple of them being the user opened the template folder in the open dialog and selected the template file to edit.
Comment 8 Aron Budea 2017-07-01 23:04:33 UTC
(In reply to Yousuf Philips (jay) from comment #7)
> I wouldnt be infavour of changing the behaviour, but what behaviour would
> you change it to?

There's already an example of this: the choice "Open Copy" when you try to open a file that is already opened in a different instance. This is also what you could do now if the template actually opened, just through multiple steps.

Ok, let's forget the other part.
Comment 9 Yousuf Philips (jay) (retired) 2017-07-02 21:00:28 UTC
(In reply to Aron Budea from comment #8)
> There's already an example of this: the choice "Open Copy" when you try to
> open a file that is already opened in a different instance. This is also
> what you could do now if the template actually opened, just through multiple
> steps.

When you open a document that is already open somewhere else, you are given the option to open it read-only or open it for editing. When a user chooses to edit a template, that is the only thing he wants to do, so he doesnt care if the template is set to read-only or in a path he doesnt have write access to, he wants to edit it, so there isnt a need to have multiple edit labels based on the user's access to the file.
Comment 10 Aron Budea 2017-07-02 21:12:41 UTC
(In reply to Yousuf Philips (jay) from comment #9)
> When you open a document that is already open somewhere else, you are given
> the option to open it read-only or open it for editing. When a user chooses
> to edit a template, that is the only thing he wants to do, so he doesnt care
> if the template is set to read-only or in a path he doesnt have write access
> to, he wants to edit it, so there isnt a need to have multiple edit labels
> based on the user's access to the file.

I do think the information that the template is editable in-place or not is important. Not because it alters the user action, but because it's a relevant piece of detail: they can't actually edit the template, only a copy of it.
Comment 11 Yousuf Philips (jay) (retired) 2017-07-03 20:08:25 UTC
(In reply to Aron Budea from comment #10)
> I do think the information that the template is editable in-place or not is
> important.

Definitely a useful piece of information that should be presented to users at the the most relevant time, when they are saving, so that we can provide users with clear information of why when they clicked the save button or pressed Ctrl+S, the save dialog will be appearing.

> Not because it alters the user action, but because it's a
> relevant piece of detail: they can't actually edit the template, only a copy
> of it.

A user is never actually editing the file they open, they are editing a copy of it until they click the save button, and then the file on disk is overwritten.

Guess we'll have to agree to disagree on this, so lets see what others think of it. Cor, Stuart, Heiko: what is your take on this issue?
Comment 12 Cor Nouws 2017-08-11 15:23:10 UTC
When I open a file that is (for me) read-only, it shows as such, and only Save As is allowed.
I do expect the same with templates.
Comment 13 Harald Koester 2018-01-30 11:53:05 UTC
Checked with versions 5.4.4 and 6.0.0.3 (Win 10):
Bug still exists in 5.4.4. But it works for me with version 6.6.0.3:

...
[5] ... The template is opened as read-only and the read-only bar is displayed. 
[6] Click Edit Document. A warning is displayed, because there are no access rights. This is OK.
[7] Click "Yes" in order to edit a copy of the template. The document is opened with the default file name "Untitled 1.odt". Would it not be better to open a file with the extension "ott"?

I'm not sure if all aspects mentioned here in this report are considered in this solution.
Comment 14 blendergeek 2018-02-14 17:13:19 UTC
As of 6.0.1.1, it works like this:

[1] Ensure, that you are a user without admin rights on your system. In this case the predefined templates are read-only.
[2] Open Template Manager: File > New > Templates.
[3] Template filter: Select “Documents, Business Correspondence”. Two templates should be displayed: “Moderate” and “Modern” business letter.
[4] Right click one of the templates: A context menu is displayed.
[5] Select “Edit”. The Template Manager is closed. 
[6] The template is opened as read-only.

I feel that this bug is fixed and I am marking as RESOLVED (WORKSFORME).
Comment 15 Harald Koester 2018-02-20 11:30:47 UTC
I agree. Hence bug closed.