Skip to content

Theme selection not showing when using SSO #7257

Closed

Description

@Computroniks

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

When using a SSO provider (in this case OIDC) it seems that selecting the theme in the user settings does not change the displayed theme.

When selecting the theme in settings, the request to the API is made and the response is 302 (as expected) and the setting is updated in the common_colortheme table (see snippet below), however the theme never changes for the user. It works as expected for a non SSO user but for SSO it seems to fail.

inventree=# select * from common_colortheme;
 id |    name     |      user       
----+-------------+-----------------
  1 | dark-reader | admin
 38 | darker      | Matthew Nickson

Steps to Reproduce

  1. Setup SSO provider (openid_connect)
  2. Login
  3. Change default theme to dark-reader
  4. Note no change

Expected behaviour

Theme updates

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Version Information:

InvenTree-Version: 0.15.1
Django Version: 4.2.12
Commit Hash: be3b22c
Commit Date: 2024-05-15

Database: postgresql
Debug-Mode: False
Deployed using Docker: False
Platform: Linux-6.8.4-3-pve-x86_64-with-glibc2.35
Installer: GIT

Active plugins: False

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

The demo site doesn't use SSO so this doesn't apply

Relevant log output

One slightly interesting thing from the server.err.log is this for the SSO user (there are multiple for each role so I have just included one below):

/opt/inventree/env/lib/python3.10/site-packages/django/core/cache/backends/base.py:117: CacheKeyWarning: Cache key contains characters that will cause errors if used with memcached: ':1:role_Matthew Nickson_return_order_delete'
  warnings.warn(warning, CacheKeyWarning)

Activity

  1. added
    bug
    question
    triage:not-checked
    on May 18, 2024
  2. matmair commented on Jul 1, 2024

    @matmair
    Member

    Hi there @Computroniks! This got lost in the notification flood sadly. Can you please confirm this is still happening?

  3. removed
    triage:not-checked
    on Jul 1, 2024
  4. self-assigned this
    on Jul 1, 2024
  5. added this to the 0.16.0 milestone on Jul 1, 2024
  6. removed
    question
    on Jul 1, 2024
  7. Computroniks commented on Jul 1, 2024

    @Computroniks
    Author
  8. Computroniks commented on Jul 2, 2024

    @Computroniks
    Author

    @matmair Updated to the version shown below, the issue still happens.

    # Version Information:
    InvenTree-Version: 0.15.4
    Django Version: 4.2.12
    Commit Hash: fa1a9da
    Commit Date: 2024-06-16
    
    Database: postgresql
    Debug-Mode: False
    Deployed using Docker: False
    Platform: Linux-6.8.4-3-pve-x86_64-with-glibc2.35
    Installer: GIT
    
    Active plugins: False
    
  9. matmair commented on Jul 4, 2024

    @matmair
    Member

    I have just tested this with GitHub SSO and it seems to work with GitHub SSO but I have a feeling - what is your setting for Display Users full names? Under General

  10. Computroniks commented on Jul 4, 2024

    @Computroniks
    Author

    It was set to on, but after I turned it off the issue is resolved.

  11. matmair commented on Jul 4, 2024

    @matmair
    Member

    Ok that is passable solution till the permanent fix in #7556 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions