fix: only System Manager can work with public Notes
Role: System Manager

https://user-images.githubusercontent.com/14891507/208681483-6fcee4f6-ebdf-4b19-9af2-3285b2884414.mov
Role: All

https://user-images.githubusercontent.com/14891507/208681653-2aec5d6c-7c1c-4709-a56e-08b89e929864.mov
Tests
Unfortunately, many test cases use the Note doctype. For example, for testing assignment rules or CRUD via FrappeClient. I had to touch many of these – not pretty but, i think, unavoidable.
Todo:
- [x] adapt UI tests to work with the new Note behavior
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@barredterra multiple tests failing from modified files :eyes:
Yes, many tests have been built around Note and need to be refactored 🥲
Working on it
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
Codecov Report
Merging #19375 (25fd202) into develop (b247c38) will increase coverage by
0.02%. The diff coverage is71.42%.
Additional details and impacted files
@@ Coverage Diff @@
## develop #19375 +/- ##
===========================================
+ Coverage 64.04% 64.07% +0.02%
===========================================
Files 760 760
Lines 68965 68943 -22
Branches 6235 6229 -6
===========================================
+ Hits 44169 44172 +3
+ Misses 21272 21248 -24
+ Partials 3524 3523 -1
| Flag | Coverage Δ | |
|---|---|---|
| server | 68.95% <71.42%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
The remaining UI test failure (kanban.js) is unrelated. Will get this fixed this in a separate PR. (-> https://github.com/frappe/frappe/pull/20505)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@barredterra Can you please make requested changes so that we can get this PR merged?
Public notes should be visible/readable to All?
This was disabled because permlevel did not work as expected. Reenabled, since we improved the permlevel implementation in the meantime.
Toggle between "Edit Mode" and "Read Mode"
Done
Private notes of other users should not be visible even to System Manager
Done
~~@surajshetty3416 I feel like this PR is really messy and barely reviewable. Should I just start from scratch?~~
Edit: nevermind, most of the changes are really needed