Skip to content
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

Force default user before rendering login page #4620

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

aledeg
Copy link
Member

@aledeg aledeg commented Sep 18, 2022

Closes #3706, #3057

Changes proposed in this pull request:

  • Force the use of the default user before rendering the login page

How to test the feature manually:

  1. Add a user with a theme different from the installation theme.
  2. Try to login with a wrong password.
  3. Validate that the displayed theme is the installation theme and not the user theme

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard)
  • documentation updated

Additional information can be found in the documentation.

@aledeg aledeg added UI 🎨 User Interfaces Security 🛡️ labels Sep 18, 2022
@Alkarex Alkarex added this to the 1.20.1 milestone Sep 18, 2022
@Alkarex Alkarex linked an issue Sep 18, 2022 that may be closed by this pull request
@Alkarex Alkarex merged commit 37cf233 into FreshRSS:edge Sep 18, 2022
@Alkarex Alkarex modified the milestones: 1.20.1, 1.21.0 Sep 18, 2022
@aledeg aledeg deleted the fix-login-screen-theme branch September 18, 2022 11:55
@math-GH
Copy link
Contributor

math-GH commented Sep 18, 2022

I cannot login anymore on edge

grafik

@aledeg
Copy link
Member Author

aledeg commented Sep 18, 2022

Do you have a Theme set in the config for user _?

@aledeg
Copy link
Member Author

aledeg commented Sep 18, 2022

It's probably missing something to default on the default user config. I'll look into that

@math-GH
Copy link
Contributor

math-GH commented Sep 18, 2022

Do you have a Theme set in the config for user _?

Alternative dark theme is set for default user

@aledeg
Copy link
Member Author

aledeg commented Sep 18, 2022

Could you post the content of your data/users/_/config.php file?

@math-GH
Copy link
Contributor

math-GH commented Sep 18, 2022

Could you post the content of your data/users/_/config.php file?

data/users/_/ does not have a config.php file

Default user is "admin":
data/users/admin/config.php

<?php
return array (
  'enabled' => true,
  'is_admin' => true,
  'language' => 'en',
  'archiving' => 
  array (
    'keep_period' => 'P3M',
    'keep_max' => 200,
    'keep_min' => 50,
    'keep_favourites' => true,
    'keep_labels' => true,
    'keep_unreads' => false,
  ),
  'ttl_default' => 3600,
  'dynamic_opml_ttl_default' => 43200,
  'mail_login' => '',
  'email_validation_token' => '',
  'token' => '',
  'passwordHash' => '$2a$09$FXR.nmRgktBaM/LTJHYFBuM3ejCWJiDxwOfgVmy7jK.IpPaRIS',
  'apiPasswordHash' => '',
  'feverKey' => '',
  'posts_per_page' => 20,
  'since_hours_posts_per_rss' => 168,
  'max_posts_per_rss' => 400,
  'view_mode' => 'normal',
  'default_view' => 'unread',
  'default_state' => 2,
  'show_fav_unread' => false,
  'auto_load_more' => true,
  'display_posts' => false,
  'display_categories' => 'active',
  'show_tags' => 'b',
  'show_tags_max' => '5',
  'show_author_date' => 'b',
  'show_feed_name' => '0',
  'hide_read_feeds' => true,
  'onread_jump_next' => true,
  'lazyload' => true,
  'sides_close_article' => true,
  'sticky_post' => true,
  'reading_confirm' => false,
  'auto_remove_article' => true,
  'mark_updated_article_unread' => false,
  'sort_order' => 'DESC',
  'anon_access' => false,
  'mark_when' => 
  array (
    'article' => '1',
    'gone' => false,
    'max_n_unread' => false,
    'reception' => false,
    'same_title_in_feed' => false,
    'scroll' => '1',
    'site' => '1',
  ),
  'theme' => 'Alternative-Dark',
  'content_width' => 'thin',
  'shortcuts' => 
  array (
    'actualize' => 'q',
    'mark_read' => 'r',
    'mark_favorite' => 'f',
    'go_website' => 'Space',
    'next_entry' => 'j',
    'next_unread_entry' => 'h',
    'prev_entry' => 'k',
    'skip_next_entry' => 'n',
    'skip_prev_entry' => 'p',
    'first_entry' => 'home',
    'last_entry' => 'end',
    'collapse_entry' => 'c',
    'load_more' => 'm',
    'auto_share' => 's',
    'focus_search' => 'a',
    'user_filter' => 'u',
    'help' => 'f1',
    'close_dropdown' => 'escape',
    'normal_view' => '1',
    'global_view' => '2',
    'reading_view' => '3',
    'rss_view' => '4',
    'toggle_media' => 'v',
  ),
  'show_favicons' => true,
  'icons_as_emojis' => false,
  'simplify_over_n_feeds' => 1000,
  'topline_read' => true,
  'topline_favorite' => true,
  'topline_thumbnail' => 'none',
  'topline_summary' => false,
  'topline_display_authors' => true,
  'topline_date' => false,
  'topline_link' => true,
  'bottomline_read' => true,
  'bottomline_favorite' => true,
  'bottomline_sharing' => true,
  'bottomline_tags' => true,
  'bottomline_date' => true,
  'bottomline_link' => true,
  'sharing' => 
  array (
    0 => 
    array (
      'type' => 'email',
      'method' => 'GET',
      'field' => '',
      'name' => 'Email',
      'url' => NULL,
    ),
    1 => 
    array (
      'type' => 'facebook',
      'method' => 'GET',
      'field' => '',
      'name' => 'Facebook',
      'url' => NULL,
    ),
    2 => 
    array (
      'type' => 'web-sharing-api',
      'method' => 'GET',
      'field' => '',
      'name' => 'Default System Sharing',
      'url' => NULL,
    ),
    3 => 
    array (
      'type' => 'clipboard',
      'method' => 'GET',
      'field' => '',
      'name' => 'Clipboard',
      'url' => NULL,
    ),
    4 => 
    array (
      'type' => 'print',
      'method' => 'GET',
      'field' => '',
      'name' => 'Print',
      'url' => NULL,
    ),
    5 => 
    array (
      'type' => 'archivePH',
      'method' => 'GET',
      'field' => '',
      'name' => 'archive.ph',
      'url' => NULL,
    ),
    6 => 
    array (
      'type' => 'pocket',
      'method' => 'GET',
      'field' => '',
      'name' => 'Pocket',
      'url' => NULL,
    ),
    7 => 
    array (
      'type' => 'mastodon',
      'method' => 'GET',
      'field' => '',
      'name' => 'Mastodon',
      'url' => 'https://norden.social/',
    ),
  ),
  'queries' => 
  array (
    0 => 
    array (
      'name' => 'Query n°2',
      'search' => 'freitag',
      'url' => './?search=freitag',
    ),
    1 => 
    array (
      'name' => 'Qä 1',
      'search' => 'Japan',
      'state' => '3',
      'url' => './?search=Japan&amp;state=3',
    ),
    2 => 
    array (
      'name' => 'Query n°3',
      'url' => './',
    ),
  ),
  'html5_notif_timeout' => 0,
  'show_nav_buttons' => true,
  'extensions_enabled' => 
  array (
    'Custom CSS' => false,
    'ThreePanesView' => false,
  ),
  'wrapTitle_desktop' => 2,
  'wrapTitle_mobile' => 3,
  'topline_tags' => false,
  'extension_page_url' => 'https://raw.githubusercontent.com/FreshRSS/Extensions/master/extensions.json',
  'cache_extension_page' => true,
);

@aledeg
Copy link
Member Author

aledeg commented Sep 18, 2022

Thank you. I understand what's happening. I'll figure something out. I'll keep you posted

@Alkarex Alkarex modified the milestones: 1.21.0, 1.20.1 Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] login screen: UI changed after finding out an account Display default theme on login page
3 participants