Skip to content

Make sure to always annotate can_edit and can_view. - #3126

Merged
rtibbles merged 1 commit into
learningequality:hotfixesfrom
rtibbles:can_edit_user_none
Apr 28, 2021
Merged

Make sure to always annotate can_edit and can_view.#3126
rtibbles merged 1 commit into
learningequality:hotfixesfrom
rtibbles:can_edit_user_none

Conversation

@rtibbles

Copy link
Copy Markdown
Member

Summary

Description of the change(s) you made

Fixes regression whereby can_edit and can_view were not getting annotated on the User queryset for the ChannelUser endpoint.
Adds regression test to try to catch this in the future.

Fixes#3125

@rtibbles
rtibbles requested a review from bjesterApril 28, 2021 15:37

@bjesterbjester left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good if tests pass

@codecov

codecovBot commented Apr 28, 2021

Copy link
Copy Markdown

Codecov Report

Merging #3126 (ef63539) into hotfixes (28587f8) will increase coverage by 5.35%.
The diff coverage is 93.05%.

Impacted file tree graph

@@ Coverage Diff @@## hotfixes #3126 +/- ##
============================================
+ Coverage 80.80% 86.16% +5.35% 
============================================
Files 281 305 +24 Lines 12659 16476 +3817 ============================================
+ Hits 10229 14196 +3967 + Misses 2430 2280 -150 
Impacted FilesCoverage Δ
contentcuration/contentcuration/decorators.py56.60% <50.00%> (-37.60%)⬇️
...ntentcuration/contentcuration/db/models/manager.py91.05% <90.83%> (-8.95%)⬇️
contentcuration/contentcuration/db/models/query.py94.23% <93.75%> (-5.77%)⬇️
contentcuration/contentcuration/forms.py82.35% <94.04%> (+33.89%)⬆️
contentcuration/contentcuration/api.py92.06% <100.00%> (+1.43%)⬆️
contentcuration/contentcuration/apps.py100.00% <100.00%> (+11.11%)⬆️
contentcuration/contentcuration/celery.py90.00% <100.00%> (-1.67%)⬇️
...tentcuration/contentcuration/context_processors.py100.00% <100.00%> (ø)
...ontentcuration/contentcuration/db/advisory_lock.py100.00% <100.00%> (ø)
...tcuration/contentcuration/db/models/expressions.py95.23% <100.00%> (-4.77%)⬇️
... and 191 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3f7bf8...ef63539. Read the comment docs.

@rtibbles
rtibbles merged commit 315f8ae into learningequality:hotfixesApr 28, 2021
@rtibbles
rtibbles deleted the can_edit_user_none branch April 28, 2021 16:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rtibbles@bjester