webkom / lego

Backend for abakus.no
https://lego.abakus.no
MIT License
53 stars 20 forks source link

Give permission to see Allergies for Event to Responsible Group #3495

Closed danielyanghansen closed 11 months ago

danielyanghansen commented 11 months ago

Backend checks if user is part of responsible group when delegating authorization to view allergies.

The corresponding serializer has also been updated to include the "ResponsibleGroup" field so that frontend also can check if user should be able to see the allergy tab

Resolves: ABA-589

Arashfa0301 commented 11 months ago

Looks good to me :)

codecov[bot] commented 11 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (6abb9ef) 88.20% compared to head (bf78d3f) 88.21%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3495 +/- ## ======================================= Coverage 88.20% 88.21% ======================================= Files 666 666 Lines 21069 21083 +14 ======================================= + Hits 18584 18598 +14 Misses 2485 2485 ``` | [Files](https://app.codecov.io/gh/webkom/lego/pull/3495?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom) | Coverage Δ | | |---|---|---| | [lego/apps/events/models.py](https://app.codecov.io/gh/webkom/lego/pull/3495?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom#diff-bGVnby9hcHBzL2V2ZW50cy9tb2RlbHMucHk=) | `97.22% <100.00%> (+0.02%)` | :arrow_up: | | [lego/apps/events/serializers/events.py](https://app.codecov.io/gh/webkom/lego/pull/3495?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom#diff-bGVnby9hcHBzL2V2ZW50cy9zZXJpYWxpemVycy9ldmVudHMucHk=) | `96.98% <100.00%> (+0.01%)` | :arrow_up: | | [lego/apps/events/tests/test\_events\_api.py](https://app.codecov.io/gh/webkom/lego/pull/3495?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom#diff-bGVnby9hcHBzL2V2ZW50cy90ZXN0cy90ZXN0X2V2ZW50c19hcGkucHk=) | `89.47% <100.00%> (+0.07%)` | :arrow_up: | | [lego/apps/events/views.py](https://app.codecov.io/gh/webkom/lego/pull/3495?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=webkom#diff-bGVnby9hcHBzL2V2ZW50cy92aWV3cy5weQ==) | `82.93% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jonasdeluna commented 11 months ago

Resolves: ABA-589

linear[bot] commented 11 months ago

ABA-589 Make allergies available for the organizer group, not just the author

danielyanghansen commented 11 months ago

Tests run fine (tox -e tests)