Skip to content

Conversation

@metaforx
Copy link
Collaborator

  • 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

@codecov
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).
Report is 1 commits behind head on main.

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
Collaborator 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
Collaborator 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
@fsbraun fsbraun merged commit 5eff8c4 into django-cms:main May 3, 2025
15 checks passed
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