Skip to content

core: remove OldAuthenticatedSession content type#14507

Merged
gergosimonyi merged 3 commits intomainfrom
core/remove-old-authenticated-session-content-type
May 14, 2025
Merged

core: remove OldAuthenticatedSession content type#14507
gergosimonyi merged 3 commits intomainfrom
core/remove-old-authenticated-session-content-type

Conversation

@gergosimonyi
Copy link
Collaborator

Fixes #14437

gergosimonyi and others added 2 commits May 14, 2025 13:26
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
@gergosimonyi gergosimonyi requested a review from a team as a code owner May 14, 2025 11:29
@netlify
Copy link

netlify bot commented May 14, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 8ad79ff
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/6824888871961700091bc904

@netlify
Copy link

netlify bot commented May 14, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 8ad79ff
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/68248888e4cdf2000804bb15

@gergosimonyi
Copy link
Collaborator Author

/cherry-pick version-2025.4


# Remove potential lingering old permissions
# See https://code.djangoproject.com/ticket/28417
call_command("remove_stale_contenttypes", "--no-input")
Copy link
Member

Choose a reason for hiding this comment

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

Instead of using call_command this should be directly calling the command from from django.contrib.contenttypes.management.commands import remove_stale_contenttypes, also needs to be done in the with tenant: context manager

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Offline resolution:

  • with tenant: you're correct
  • call_command: we should use it instead of writing all the boilerplate

@github-actions
Copy link
Contributor

github-actions bot commented May 14, 2025

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-8ad79ff1421409a1c0bf7db3124bebcd47409d8e
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-8ad79ff1421409a1c0bf7db3124bebcd47409d8e

Afterwards, run the upgrade commands from the latest release notes.

@gergosimonyi gergosimonyi merged commit 4dcd481 into main May 14, 2025
89 checks passed
@gergosimonyi gergosimonyi deleted the core/remove-old-authenticated-session-content-type branch May 14, 2025 13:02
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 14, 2025
* core: remove `OldAuthenticatedSession` content type

This was left out from #9736

* remove stale content types in `repair_permissions`

Co-authored-by: Jens Langhammer <jens@goauthentik.io>

* run `remove_stale_contenttypes` for each tenant

---------

Co-authored-by: Jens Langhammer <jens@goauthentik.io>
BeryJu added a commit that referenced this pull request May 14, 2025
…) (#14509)

core: remove `OldAuthenticatedSession` content type (#14507)

* core: remove `OldAuthenticatedSession` content type

This was left out from #9736

* remove stale content types in `repair_permissions`



* run `remove_stale_contenttypes` for each tenant

---------

Co-authored-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
@codecov
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.75%. Comparing base (d0dc14d) to head (8ad79ff).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14507   +/-   ##
=======================================
  Coverage   92.74%   92.75%           
=======================================
  Files         809      809           
  Lines       41525    41525           
=======================================
+ Hits        38514    38516    +2     
+ Misses       3011     3009    -2     
Flag Coverage Δ
e2e 47.88% <ø> (+<0.01%) ⬆️
integration 24.41% <ø> (ø)
unit 90.55% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

kensternberg-authentik added a commit that referenced this pull request May 22, 2025
* main: (60 commits)
  website: bump the build group in /website with 6 updates (#14502)
  core: remove `OldAuthenticatedSession` content type (#14507)
  core: bump msgraph-sdk from 1.29.0 to 1.30.0 (#14503)
  core: bump twilio from 9.6.0 to 9.6.1 (#14505)
  core: bump psycopg[c,pool] from 3.2.8 to 3.2.9 (#14504)
  enterprise: fix expired license's users being counted (#14451)
  website/integrations: fix missing closing brace for semaphore (#14467)
  tests/e2e: Add E2E tests for Flow SFE (#14484)
  website: bump semver from 7.7.1 to 7.7.2 in /website (#14491)
  core: bump django from 5.1.8 to 5.1.9 (#14483)
  core: bump psycopg[c,pool] from 3.2.7 to 3.2.8 (#14481)
  core: bump sentry-sdk from 2.27.0 to 2.28.0 (#14482)
  root: pin package version in pyproject for dependabot (#14469)
  core: fix session migration when old session can't be loaded (#14466)
  root: temporarily deactivate database pool option (#14443)
  website: bump the build group in /website with 3 updates (#14475)
  website/docs: stages: fix-typo (#14477)
  website/docs: Update Kubernetes Bootstrap Instructions (#14471)
  root: improve sentry distributed tracing (#14468)
  Revert "web/admin: fix enterprise menu display" (#14458)
  ...
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.

When adding Can view Authenticated Session as a global permission to a role, authentik returns 405

2 participants