frappe icon indicating copy to clipboard operation
frappe copied to clipboard

fix: only System Manager can work with public Notes

Open barredterra opened this issue 3 years ago • 15 comments

Role: System Manager

admin_list

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

Role: All

all_list

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

barredterra avatar Dec 20 '22 13:12 barredterra

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.

stale[bot] avatar Dec 28 '22 18:12 stale[bot]

@barredterra multiple tests failing from modified files :eyes:

ankush avatar Jan 02 '23 05:01 ankush

Yes, many tests have been built around Note and need to be refactored 🥲

Working on it

barredterra avatar Jan 02 '23 09:01 barredterra

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.

stale[bot] avatar Jan 10 '23 00:01 stale[bot]

Codecov Report

Merging #19375 (25fd202) into develop (b247c38) will increase coverage by 0.02%. The diff coverage is 71.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.

codecov[bot] avatar Jan 18 '23 13:01 codecov[bot]

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.

stale[bot] avatar Jan 31 '23 23:01 stale[bot]

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.

stale[bot] avatar Feb 09 '23 02:02 stale[bot]

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.

stale[bot] avatar Feb 17 '23 05:02 stale[bot]

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.

stale[bot] avatar Feb 24 '23 10:02 stale[bot]

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.

stale[bot] avatar Mar 03 '23 11:03 stale[bot]

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)

barredterra avatar Mar 09 '23 17:03 barredterra

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.

stale[bot] avatar Mar 24 '23 23:03 stale[bot]

@barredterra Can you please make requested changes so that we can get this PR merged?

surajshetty3416 avatar Apr 24 '23 13:04 surajshetty3416

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

barredterra avatar Apr 24 '23 14:04 barredterra

~~@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

barredterra avatar Apr 24 '23 14:04 barredterra