Closed hmpf closed 3 years ago
Merging #186 (7acbfb0) into master (9451f43) will increase coverage by
0.03%
. The diff coverage is40.00%
.
@@ Coverage Diff @@
## master #186 +/- ##
==========================================
+ Coverage 55.75% 55.79% +0.03%
==========================================
Files 112 112
Lines 6191 6200 +9
==========================================
+ Hits 3452 3459 +7
- Misses 2739 2741 +2
Impacted Files | Coverage Δ | |
---|---|---|
src/easydmp/auth/api/v1/views.py | 44.70% <0.00%> (ø) |
|
src/easydmp/auth/api/v2/views.py | 44.70% <0.00%> (ø) |
|
src/easydmp/dmpt/admin.py | 54.96% <0.00%> (ø) |
|
src/easydmp/dmpt/models.py | 52.10% <0.00%> (ø) |
|
src/easydmp/lib/admin.py | 40.42% <0.00%> (ø) |
|
src/easydmp/auth/models.py | 83.33% <72.72%> (-3.34%) |
:arrow_down: |
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 9451f43...7acbfb0. Read the comment docs.
This ensures that we can prevent superusers from doing things by simply toggling is_active
and not deleting the user. Strictly speaking, checking for is_staff
is not necessary, but currently there's no point in being superuser without also being staff.
User.has_superpowers
andUser.objects.have_superpowers()
check that the user is both active and staff in addition to being superuser.