ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69381
|
Tue Jun 29 20:13:36 2021 |
| Sebastian Schenk | sebastian.schenk@physik.uni-halle.de | Question | Linux | 3.13 | Re: Drop attachments here... |
I could figure out the bug. A fix can be found in this commit.
https://bitbucket.org/merrx/elog/commits/c3e3c4af9666006558aaf26d8f4841800e69f9af
Sebastian Schenk wrote: |
In my testings I didn't found this behaviour, but my collegues also reported this issue.
So I searched for the difference between my test setup and the production logbooks.
I believe the "restrict edit = 1" config option may be responsible for this behaviour.
I had the browser console running in the background and "Drag&Drop" send an XHR request,
which failed with the message: "Only user can edit this entry".
This message is tied to the "restrict edit" option as far as I know.
So I tried removing the option and upload via "Drag&Drop" started to work as intended.
This behaviour only occurs for non-admin users, as admin users are not affected by
Can you verify this?
I can verify to get the same error message in this elog forum in the browser console.
Xuan Wu wrote: |
I just used my own account to test the "Drag&Drop" function in this forum , and it failed. In our case, we need to upload ten more images into logbook at once, it's more effective to use "Drag&Drop" than "Browse&Upload" feature for "Browse&Upload" only can choose one attachment at once, but "Drag&Drop" can choose several attachments at once. The admin user can use this feature, but non-admin user not in our site. I did run the elog server as user "root". I'm not sure it is related to the problem.
Sebastian Schenk wrote: |
I can't confirm this behavoiur. In our instance, every user can use the attachment function of the elog.
Either through "Drag&Drop" or "Browse&Upload" in the entry editor.
What do you mean by "root" user?
The elog can have serveral admin users, but this behaviour is equal for admin and non-admin users.
You should not run the elog server as user "root" of the machine for security reason, but also for issues with file permissions.
Xuan Wu wrote: |
The function of "Drop attachments here..." is only for root user? I'd like it could be used by all users.
|
|
|
|
|
69382
|
Tue Jun 29 20:20:38 2021 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.13 | Re: Drop attachments here... |
Looks good, I merged the pull request. |
69383
|
Wed Jun 30 04:38:21 2021 |
| Xuan Wu | wux@ihep.ac.cn | Question | Linux | 3.13 | Re: Drop attachments here... |
Excellent, Thanks!
Sebastian Schenk wrote: |
I could figure out the bug. A fix can be found in this commit.
https://bitbucket.org/merrx/elog/commits/c3e3c4af9666006558aaf26d8f4841800e69f9af
Sebastian Schenk wrote: |
In my testings I didn't found this behaviour, but my collegues also reported this issue.
So I searched for the difference between my test setup and the production logbooks.
I believe the "restrict edit = 1" config option may be responsible for this behaviour.
I had the browser console running in the background and "Drag&Drop" send an XHR request,
which failed with the message: "Only user can edit this entry".
This message is tied to the "restrict edit" option as far as I know.
So I tried removing the option and upload via "Drag&Drop" started to work as intended.
This behaviour only occurs for non-admin users, as admin users are not affected by
Can you verify this?
I can verify to get the same error message in this elog forum in the browser console.
Xuan Wu wrote: |
I just used my own account to test the "Drag&Drop" function in this forum , and it failed. In our case, we need to upload ten more images into logbook at once, it's more effective to use "Drag&Drop" than "Browse&Upload" feature for "Browse&Upload" only can choose one attachment at once, but "Drag&Drop" can choose several attachments at once. The admin user can use this feature, but non-admin user not in our site. I did run the elog server as user "root". I'm not sure it is related to the problem.
Sebastian Schenk wrote: |
I can't confirm this behavoiur. In our instance, every user can use the attachment function of the elog.
Either through "Drag&Drop" or "Browse&Upload" in the entry editor.
What do you mean by "root" user?
The elog can have serveral admin users, but this behaviour is equal for admin and non-admin users.
You should not run the elog server as user "root" of the machine for security reason, but also for issues with file permissions.
Xuan Wu wrote: |
The function of "Drop attachments here..." is only for root user? I'd like it could be used by all users.
|
|
|
|
|
|
69384
|
Wed Jun 30 13:50:08 2021 |
| Sebastian Schenk | sebastian.schenk@physik.uni-halle.de | Question | Linux | 3.13 | Re: Drop attachments here... |
Thanks for the merge.
I found a more general solution, as there could be the posibility to have the author as "select" or "radio box" input in the form, where the fix breaks.
But I think in most of the cases the author is a preset input, if used with "restrict edit = 1", so the merged fix should be fine.
https://bitbucket.org/merrx/elog/commits/7aacfbcac43b1192e5271fa7b2c80f4825c94d23
Today we ran into this issue again, but this time the curpit was encoding...
The author name in the password file was differently encoded as the author name from the xhr request.
For this instance there was a umlaut in the name.
I haven't got a good solution for this at the moment.
The workaround is to check the encording in the password file and make it matching.
But as for automated logins / user generation e.g. via LDAP (in our case) one should be aware of this issue.
Stefan Ritt wrote: |
Looks good, I merged the pull request.
|
|
68476
|
Wed Nov 30 18:06:26 2016 |
| John Becker | j.becker@airportaruba.com | Question | Linux | 3.12-9a18b27 | Disable Delete option when user has the capability to Edit an entry |
Hi, I have a logbook where users can add entries and edit entries.
The delete option has been removed from the menu, but when they edit an entry they are able to delete the entry.
Is there a way to remove the Delete option from the menu that appears when Editing an entry?
Please advise,
Thanks,
John
|
68477
|
Wed Nov 30 19:01:03 2016 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.12-9a18b27 | Re: Disable Delete option when user has the capability to Edit an entry |
Save drafts = 0
John Becker wrote: |
Hi, I have a logbook where users can add entries and edit entries.
The delete option has been removed from the menu, but when they edit an entry they are able to delete the entry.
Is there a way to remove the Delete option from the menu that appears when Editing an entry?
Please advise,
Thanks,
John
|
|
68480
|
Thu Dec 1 13:36:16 2016 |
| John Becker | j.becker@airportaruba.com | Question | Linux | 3.12-9a18b27 | Re: Disable Delete option when user has the capability to Edit an entry |
Hi Stefan,
Thanks for your reply, I did as suggested but the button "Delete" still appears when the edit entry is selected.
Am I overlooking something?
Regards,
John
Stefan Ritt wrote: |
Save drafts = 0
John Becker wrote: |
Hi, I have a logbook where users can add entries and edit entries.
The delete option has been removed from the menu, but when they edit an entry they are able to delete the entry.
Is there a way to remove the Delete option from the menu that appears when Editing an entry?
Please advise,
Thanks,
John
|
|
|
68481
|
Fri Dec 2 13:50:11 2016 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.12-9a18b27 | Re: Disable Delete option when user has the capability to Edit an entry |
No, I get a different result. If I put "Save drafts = 0" in the config example coming with the distribution, I get the following:

sot he "Delete" button is replaced by a "Back" button.
Probably you have an old version of elog, hava a typo on your config, or something like that.
Stefan |