Bug 153952 - Default template cannot be modified (by non-root user?)
Summary: Default template cannot be modified (by non-root user?)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Template-Manager Templates
  Show dependency treegraph
 
Reported: 2023-03-03 22:30 UTC by Eyal Rozenberg
Modified: 2023-03-06 12:44 UTC (History)
1 user (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 Eyal Rozenberg 2023-03-03 22:30:10 UTC
I'm running LO as a non-root/non-privileged user - as one does on a typical operating system.

When I "Manage Templates", choose the Default Template and Edit it - it opens, but a top blue bar tells me the template is open in Read Only mode, suggesting I click a button in order to edit the template - even though that's what I said I want to do. This is already a problem, and doubly so because I'm not told the _reason_ I can't edit the template; nor was I prevented from doing so in the Manage Templates dialog.

But the more serious problem is that when I try to save - to overwrite - the template file, I get:

"Error saving the document Default:
Write Error.
The file could not be written."

this is again twice a problem: First, the write failing, which I suspect is due to the fact that I'm not root, so I can't overwrite that file, and second, that I'm not told what actually happened, just a vague message about an error.

The immediate thing to fix is to clarify to the user why they're experiencing this, i.e. some message saying "The default template can only be edited by a system administrator / root user" or something along those lines. Alternative, Edit must not be available on the context menu of nonroot-user-edit

But - this would not be satisfactory, since a user _does_ need to be able to edit their default document template. So one of the following needs to happen:

1. The default template is duplicated into a user's account when LO is first started.
2. The default template is duplicated into a user's account when the user first manages templates.
3. The default template is duplicated into a user's account when the user first opens it for editing
4. The user is prompted to set their default template to a duplicate of the system-wide one, to be able to edit it, and must themselves choose whether to do this.

In any of those cases - once the duplication happens, choosing the default template should open the user-home-directory-version, not the system-wide version; and a system-wide default may potentially also start being presented.

5. When trying to save a root-only-editable template, the user will be prompted to either give up or provide the root password.
Comment 1 Mike Kaganski 2023-03-04 05:19:25 UTC
We just badly need to rename that template from the idiotic "default" name (which lies, because it has nothing to do with what happens by default)
Comment 2 Eyal Rozenberg 2023-03-04 10:24:12 UTC
(In reply to Mike Kaganski from comment #1)
> We just badly need to rename that template from the idiotic "default" name
> (which lies, because it has nothing to do with what happens by default)

Well, users coming from MSO assume that this is how you edit the styles you get in a new document. In fact, that's what I usually remember :-P

So, changing the name would also need to be accompanied by making it more obvious to the user how to actually edit the defaults.
Comment 3 Heiko Tietze 2023-03-06 12:04:17 UTC
We install factory settings in the restricted area; same happening for Gallery content see bug 131529. Content that is typically editable needs to be installed in the user space.
Comment 4 Eyal Rozenberg 2023-03-06 12:36:30 UTC
(In reply to Heiko Tietze from comment #3)
> Content that is typically editable needs to be installed in the user space.

So, I'm guessing you would support one of options (1.) - (3.)?
Comment 5 Heiko Tietze 2023-03-06 12:44:31 UTC
No duplication. We need to check what can be moved from /usr/lib/libreoffice/share/ to ~/.config/libreoffice/4 (in terms of Linux).