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

Fix/enhancement: permissions for mail rules & accounts #3869

Merged
merged 1 commit into from Jul 26, 2023
Merged

Conversation

shamoon
Copy link
Member

@shamoon shamoon commented Jul 26, 2023

Proposed change

Permissions for mail rules / accounts was basically never implemented, Im surprised it took this look to come up. Straightforward to do, it uses all existing code. Also the frontend was checking for Change (global) permissions instead of Delete on the button but of course the backend should have disallowed that too (it now does, screenshot just demonstrates this but the user wouldn't even see the button like the second screenshot).

Ps. Setting permissions for these on the frontend isn't implemented yet.

Fixes #3868

Screenshot 2023-07-25 at 7 43 02 PM Screenshot 2023-07-25 at 7 44 17 PM

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain):

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@shamoon shamoon requested review from a team as code owners July 26, 2023 04:48
@paperless-ngx-secretary paperless-ngx-secretary bot added backend frontend non-trivial Requires approval by several team members labels Jul 26, 2023
@github-actions github-actions bot added the bug Bug report or a Bug-fix label Jul 26, 2023
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #3869 (23fefc3) into dev (0beb9f0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev    #3869   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files         335      335           
  Lines       12683    12692    +9     
  Branches     1044     1044           
=======================================
+ Hits        12080    12089    +9     
  Misses        598      598           
  Partials        5        5           
Flag Coverage Δ
backend 94.07% <100.00%> (+<0.01%) ⬆️
frontend 96.65% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...components/manage/settings/settings.component.html 100.00% <ø> (ø)
src-ui/src/app/data/paperless-mail-account.ts 100.00% <ø> (ø)
src-ui/src/app/data/paperless-mail-rule.ts 100.00% <ø> (ø)
src/paperless_mail/serialisers.py 97.95% <ø> (-0.09%) ⬇️
...p/components/manage/settings/settings.component.ts 98.12% <100.00%> (+0.03%) ⬆️
src/paperless_mail/admin.py 100.00% <100.00%> (ø)
src/paperless_mail/views.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shamoon shamoon enabled auto-merge July 26, 2023 05:03
Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shamoon shamoon merged commit c22461a into dev Jul 26, 2023
26 checks passed
@shamoon shamoon deleted the fix/issue-3868 branch July 26, 2023 14:37
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend bug Bug report or a Bug-fix frontend non-trivial Requires approval by several team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Permissions to delete Email-Rules/Accounts: disabled for a user, but user can still delete them
2 participants