Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v8] Can't save edited comments on doctypes #3111

Closed
joolsr opened this issue Apr 18, 2017 · 4 comments
Closed

[v8] Can't save edited comments on doctypes #3111

joolsr opened this issue Apr 18, 2017 · 4 comments

Comments

@joolsr
Copy link

joolsr commented Apr 18, 2017

Expected Behaviour

  1. Click pencil icon to edit comment on contact to correct text.
  2. Click the tick icon to save my edit
  3. Edit saved

Actual Behaviour

  1. Click pencil icon to edit comment to correct text.
  2. Click the tick icon to save my edit
  3. Edit not saved. Get error as below

Not permitted

You do not have enough permissions to access this resource. Please contact your manager to get access.

There is no unusual contents to js console.

Steps to reproduce:

  1. I add a new contact and save this
  2. I add a comment to this comment, this is saved
  3. I click the pencil icon to edit this comment, remove a character, click the tick to save but get

Not permitted

You do not have enough permissions to access this resource. Please contact your manager to get access.

Frappe version:
8.0.18
Can replicate on demo.erpnext.com

Can replicate with other items such as trying to edit a comment on an Item (stock Item).

@joolsr
Copy link
Author

joolsr commented May 12, 2017

After some testing I found this is down to the fact the the users need to have an 'Amend' ability set then it works fine. This is true of all doctypes that uses comments i would think. I'll test some more.

Obviously a fairly easy thing to fix in core if you know how to do this and all the doctypes that use comments

@joolsr
Copy link
Author

joolsr commented May 16, 2017

Actually it needs to be 'amend' permissions on the communication docttype it appears.

@joolsr
Copy link
Author

joolsr commented Sep 20, 2017

You can add an Amend permission to be able to edit comments but this has the unwanted side affect of showing all emails as editable. This causes another issue such that a plain text email with text formatting ie new lines and spacing then loses the formatting and makes the email look very humbled and difficult to read

@joolsr
Copy link
Author

joolsr commented Dec 18, 2017

Fixed with this commit #4648 . The other comments I made only related to issues if you used amend permissions, whereas the code used here went about things differently. Will close for now

@joolsr joolsr closed this as completed Dec 18, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants