Skip to content

feat: add public language support #27

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

metaforx
Copy link
Contributor

  • Add the IsAllowedPublicLanguage permission to public endpoints. Preview endpoints unmodified and fetch all language content regardless of language publication state.
  • Fix pytest depenndencies, add missing filer, djangocms_picture (@fsbraun: should be verified if this is an isolated problem)

Fixes #1 - languages will still output all available languages but limit access on public endpoints

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (bf441ad) to head (b2ab4a4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   81.22%   81.15%   -0.07%     
==========================================
  Files          12       12              
  Lines         474      483       +9     
  Branches       41       42       +1     
==========================================
+ Hits          385      392       +7     
- Misses         63       64       +1     
- Partials       26       27       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fsbraun
Copy link
Member

fsbraun commented Apr 10, 2025

@metaforx LGTM! Why do we need filer and/or picture in the test dependencies? I agree it probably makes sense to test with some real life plugins, though.

@metaforx
Copy link
Contributor Author

@fsbraun:

In tests app settings.py filer is present. Git history tells me it was always present. Because they were not installed, my tests failed (migration). Should we remove all but text?

    'djangocms_link',
    'djangocms_picture',
    'djangocms_text',
    'filer',
    'easy_thumbnails',
    'tests.test_app',
    ```
    
But eventually, it would be a good idea to test all supported Django CMS supported plugins for rest compatibility.

@metaforx
Copy link
Contributor Author

@fsbraun:

In tests app settings.py filer is present. Git history tells me it was always present. Because they were not installed, my tests failed (migration). Should we remove all but text?

    'djangocms_link',
    'djangocms_picture',
    'djangocms_text',
    'filer',
    'easy_thumbnails',
    'tests.test_app',
    ```
    
But eventually, it would be a good idea to test all supported Django CMS supported plugins for rest compatibility.

I just realized, that filer is not installed via base.txt in requirements. so i will remove it. along with easy_thumbnails.

Ok to do this in this PR?

@metaforx metaforx force-pushed the fix/add-public-language-support branch from 74ae82f to 66ae767 Compare April 11, 2025 10:43
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.

bug: Remove non-public languages from the language list endpoint
2 participants