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

[#1657] add options to hide categories and search from anonymous users #732

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma commented Aug 14, 2023

  • added model fields (bool) for hiding categories, search bar + search page
  • added LoginMaybeRequiredMixin to categories and search views in order to conditionally restrict access to authenticated users

Taiga: #1657

@pi-sigma pi-sigma changed the title [#1657] add option to hide categories from anonymous users [#1657] add options to hide categories and search from anonymous users Aug 14, 2023
@pi-sigma pi-sigma force-pushed the feature/1657-optional-products-and-search branch from 9620d41 to 57d15fe Compare August 15, 2023 15:02
- added model field (bool) for hiding categories
- added `LoginMaybeRequiredMixin` to categories views in order to
  conditionally restrict access to authenticated users
- refactored rendering of nav bar (removed inclusion tags)
@pi-sigma pi-sigma force-pushed the feature/1657-optional-products-and-search branch from 57d15fe to 02fed6d Compare August 16, 2023 12:30
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #732 (fce4c49) into develop (141896e) will increase coverage by 0.02%.
Report is 5 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #732      +/-   ##
===========================================
+ Coverage    96.24%   96.27%   +0.02%     
===========================================
  Files          669      674       +5     
  Lines        23860    24007     +147     
===========================================
+ Hits         22965    23113     +148     
+ Misses         895      894       -1     
Files Changed Coverage Δ
...pen_inwoner/components/templatetags/header_tags.py 100.00% <ø> (ø)
src/open_inwoner/configurations/admin.py 100.00% <ø> (ø)
src/open_inwoner/utils/context_processors.py 90.90% <ø> (ø)
src/open_inwoner/components/tests/test_header.py 100.00% <100.00%> (ø)
...figuration_hide_categories_from_anonymous_users.py 100.00% <100.00%> (ø)
...nfigurations/migrations/0048_auto_20230816_1255.py 100.00% <100.00%> (ø)
src/open_inwoner/configurations/models.py 97.76% <100.00%> (+0.03%) ⬆️
src/open_inwoner/pdc/tests/test_views.py 100.00% <100.00%> (ø)
src/open_inwoner/pdc/views.py 84.64% <100.00%> (+0.47%) ⬆️
src/open_inwoner/search/tests/test_views.py 100.00% <100.00%> (ø)
... and 3 more

... and 5 files with indirect coverage changes

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

@pi-sigma pi-sigma marked this pull request as ready for review August 16, 2023 13:13
Copy link
Member

@alextreme alextreme left a comment

Choose a reason for hiding this comment

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

Looks good, however considering the refactor is a bit bigger than only the requested change @jiromaykin should also take a look (and he's back tomorrow)

@jiromaykin
Copy link
Contributor

....considering the refactor is a bit bigger than only the requested change @jiromaykin should also take a look...

I will check it out and will need to update everything locally and see what I can do here.

Copy link
Contributor

@jiromaykin jiromaykin left a comment

Choose a reason for hiding this comment

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

All else is looking good, apart from the spellign mistakes; so when logged all have become invisible, both on mobile as well as on desktop.

src/open_inwoner/configurations/models.py Outdated Show resolved Hide resolved
src/open_inwoner/configurations/models.py Outdated Show resolved Hide resolved
@pi-sigma pi-sigma force-pushed the feature/1657-optional-products-and-search branch from 02fed6d to fce4c49 Compare August 17, 2023 10:01
@alextreme alextreme merged commit 9190e39 into develop Aug 17, 2023
10 checks passed
@alextreme alextreme deleted the feature/1657-optional-products-and-search branch August 17, 2023 16:41
Sign up for free to 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.

4 participants