Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: openstax/openstax-cms

Tags

v11.3.0

Toggle v11.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
CORE-829: Add require_login_message field to Book model (#1641)

* Add require_login_message field to Book model for CORE-829

Adds a new `require_login_message` field to the Book model to support
login gates for books with content warnings. This field follows the same
pattern as the existing `content_warning` field.

Changes:
1. Created RequireLoginMessage snippet model
   - TextField for the login prompt message
   - Follows TranslatableMixin pattern for i18n support
   - Registered as Wagtail snippet for easy management

2. Added require_login_message ForeignKey to Book model
   - Optional field (null=True, blank=True)
   - SET_NULL on delete to avoid cascade issues
   - Clear help text explaining the login gate behavior

3. Added require_login_message to Book admin panels
   - Positioned next to content_warning field for logical grouping
   - Easy for admins to configure both warning and login gate together

4. Exposed require_login_message_text via API
   - Added property that returns message text or None
   - Added to api_fields for REX consumption
   - REX can check this field to determine login gate behavior

5. Created Django migrations
   - snippets/migrations/0044_requireloginmessage.py
   - books/migrations/0160_book_require_login_message.py

This allows admins to easily toggle login requirements per book by
setting a custom message. When set, REX can show the login prompt
instead of a dismiss button for logged-out users viewing the content
warning modal.

Jira: CORE-829

* Regenerate migrations using Django makemigrations

- Removed manually created migration files
- Set up local.py with django_ses removed to avoid botocore.vendored error
- Installed dev requirements
- Ran python3 manage.py makemigrations to auto-generate proper migrations

The auto-generated migrations include:
- Proper Django version and timestamp headers
- Correct handling of TranslatableMixin base class
- Proper dependency chain (wagtailcore locale dependencies)
- UUID default value for translation_key

This follows the documented best practice in CLAUDE.md.

* Fix wagtailcore dependency to match project version

Changed wagtailcore dependency from 0095 to 0094 to match the version
currently in use by the project. The migration was generated with a newer
version of Wagtail than what's installed, causing the test failure.

The project's most recent migrations reference wagtailcore 0094_alter_page_locale,
so this migration should do the same for compatibility.

* Fix migration dependency to use wagtailcore 0094 instead of 0095

The project is using an older version of Wagtail where the latest
migration is 0094_alter_page_locale. The makemigrations command was
pulling from a newer Wagtail installation that has 0095, causing a
mismatch.

Changed wagtailcore dependency from 0095_groupsitepermission to
0094_alter_page_locale to match the rest of the project.

* run after sqlite

* lets try this

* migrations

* remove unneeded migration dependency

* Revert "remove unneeded migration dependency"

This reverts commit 6b250f7.

---------

Co-authored-by: tom <[email protected]>
Co-authored-by: Michael Volo <[email protected]>

v11.3.0-test.4

Toggle v11.3.0-test.4's commit message
Revert "remove unneeded migration dependency"

This reverts commit 6b250f7.

v11.3.0-test.3

Toggle v11.3.0-test.3's commit message
remove unnecessary dep

v11.3.0-test.2

Toggle v11.3.0-test.2's commit message
stub removed migrations

v11.3.0-test.1

Toggle v11.3.0-test.1's commit message
cleanup a few more migrations

core-1640-test

Toggle core-1640-test's commit message

v11.3.0-test

Toggle v11.3.0-test's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge branch 'main' into CORE-1277-add-cta-fields

v11.2.6

Toggle v11.2.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump the github-actions group across 1 directory with 3 updates (#1635)

Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/setup-python](https://github.com/actions/setup-python) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

Updates `codecov/codecov-action` from 5.4.3 to 5.5.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5.4.3...v5.5.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v11.2.5-hotfix-test

Toggle v11.2.5-hotfix-test's commit message
update django-storages conf

v11.2.4

Toggle v11.2.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump codecov/codecov-action in the github-actions group (#1627)

Bumps the github-actions group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `codecov/codecov-action` from 5.4.2 to 5.4.3
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5.4.2...v5.4.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>