[PR #4615] [MERGED] User preferences/options cleanup #6378

Closed
opened 2026-02-05 10:30:45 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4615
Author: @ssddanbrown
Created: 10/17/2023
Status: Merged
Merged: 10/19/2023
Merged by: @ssddanbrown

Base: developmentHead: user_account


📝 Commits (10+)

  • a9d0f36 User: Started cleanup of user self-management
  • a868012 Users: Built out auth page for my-account section
  • c1b0163 My Account: Built out profile page & endpoints
  • 03c44b3 My Account: Extracted/tweaked profile text, removed old index
  • e4ea73e My Account: Cleaned-up/reorganised user header dropdown
  • cf72e48 User form: Always show external auth field, update access control
  • f9422df My Account: Added self-delete flow
  • 1294641 API Tokens: Updated interfaces to return to correct location
  • fabc854 My Account: Updated and started adding to tests
  • f55e7ca User Account: Ensured page titles for pages and api tokens

📊 Changes

41 files changed (+1258 additions, -619 deletions)

View changed files

📝 app/Access/Controllers/SocialController.php (+4 -14)
📝 app/Access/SocialAuthService.php (+4 -3)
📝 app/Api/ApiDocsController.php (+2 -0)
📝 app/Api/ApiToken.php (+8 -0)
📝 app/Api/UserApiTokenController.php (+42 -6)
app/Users/Controllers/UserAccountController.php (+223 -0)
📝 app/Users/Controllers/UserController.php (+6 -12)
📝 app/Users/Controllers/UserPreferencesController.php (+0 -82)
📝 lang/en/common.php (+1 -0)
📝 lang/en/preferences.php (+21 -3)
📝 lang/en/settings.php (+6 -2)
resources/icons/notifications.svg (+1 -0)
resources/icons/security.svg (+1 -0)
📝 resources/views/entities/watch-controls.blade.php (+1 -1)
📝 resources/views/layouts/parts/header-user-menu.blade.php (+8 -13)
📝 resources/views/settings/layout.blade.php (+1 -1)
resources/views/users/account/auth.blade.php (+87 -0)
resources/views/users/account/delete.blade.php (+43 -0)
resources/views/users/account/layout.blade.php (+29 -0)
resources/views/users/account/notifications.blade.php (+71 -0)

...and 21 more files

📄 Description

This is intended to re-organise the various user options and controls, to bring all user-facing controls into a cohesive "my-account" area. This includes the creation of new "my-account" profile controls, so we can target and seperate the editing of "my-account" from that of admin controls which are intended to manage accounts that are not the current user (mostly). Means we can provide a UX intended for the seperate use-cases.

Todo

  • Add new my-account profile form.
  • Ensure sidebar item highlighting works for all my-account items
  • Update "External Auth" fields to always show (not be auth type specific, maybe hidden by default though).
  • Have link from user profile to user admin profile form if permissions allow.
  • Have link to user public activity profile.
  • Update API token URLs and return user to correct location on save/cancel.
  • Ensure translations extracted to files
  • Provide user self-delete flow
  • Clean up & split-out (if needed) old preference test cases.
  • Clean up header profile dropdown menu.
  • Specifically cover non-admin profile email field disabling/message with testing.
  • Test across dark mode.
  • Test with different auth methods.
  • Re-test each action across all my-account and admin user management views.
  • Testing

Docs Updates

  • Advise of changes to URLs.
    • No /preferences URLs anymore.
    • API token URLs changed.
    • Old profile routes non-accessible without users-manage permission.

Notes

  • Active/inactive social accounts can now be seen for users by admins (Previously only shown to current user).
  • External auth ID field is now always available regardless of auth option set.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4615 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 10/17/2023 **Status:** ✅ Merged **Merged:** 10/19/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `user_account` --- ### 📝 Commits (10+) - [`a9d0f36`](https://github.com/BookStackApp/BookStack/commit/a9d0f3676629053422ee5340f8c83888af18d766) User: Started cleanup of user self-management - [`a868012`](https://github.com/BookStackApp/BookStack/commit/a868012048215d9ad080eee3e7bd66cfe9b1beaf) Users: Built out auth page for my-account section - [`c1b0163`](https://github.com/BookStackApp/BookStack/commit/c1b01639c10ce28fb4cc80b5d9a4b988b5d29a3e) My Account: Built out profile page & endpoints - [`03c44b3`](https://github.com/BookStackApp/BookStack/commit/03c44b399240a0c542aee03ec974c66ffd661865) My Account: Extracted/tweaked profile text, removed old index - [`e4ea73e`](https://github.com/BookStackApp/BookStack/commit/e4ea73ee25d79558ba2f0546e11197e01483b62f) My Account: Cleaned-up/reorganised user header dropdown - [`cf72e48`](https://github.com/BookStackApp/BookStack/commit/cf72e48d2a0e2fea8bbbbb777309af3b836010aa) User form: Always show external auth field, update access control - [`f9422df`](https://github.com/BookStackApp/BookStack/commit/f9422dff18ff9c36d861537b05676807c437a14a) My Account: Added self-delete flow - [`1294641`](https://github.com/BookStackApp/BookStack/commit/12946414b05930efca3f3e97970a25b94d16bf0c) API Tokens: Updated interfaces to return to correct location - [`fabc854`](https://github.com/BookStackApp/BookStack/commit/fabc854390abe2ac49d16ada34ec2d8000972cf5) My Account: Updated and started adding to tests - [`f55e7ca`](https://github.com/BookStackApp/BookStack/commit/f55e7ca3c9c4a67c457318c3747b685dbfb38ddc) User Account: Ensured page titles for pages and api tokens ### 📊 Changes **41 files changed** (+1258 additions, -619 deletions) <details> <summary>View changed files</summary> 📝 `app/Access/Controllers/SocialController.php` (+4 -14) 📝 `app/Access/SocialAuthService.php` (+4 -3) 📝 `app/Api/ApiDocsController.php` (+2 -0) 📝 `app/Api/ApiToken.php` (+8 -0) 📝 `app/Api/UserApiTokenController.php` (+42 -6) ➕ `app/Users/Controllers/UserAccountController.php` (+223 -0) 📝 `app/Users/Controllers/UserController.php` (+6 -12) 📝 `app/Users/Controllers/UserPreferencesController.php` (+0 -82) 📝 `lang/en/common.php` (+1 -0) 📝 `lang/en/preferences.php` (+21 -3) 📝 `lang/en/settings.php` (+6 -2) ➕ `resources/icons/notifications.svg` (+1 -0) ➕ `resources/icons/security.svg` (+1 -0) 📝 `resources/views/entities/watch-controls.blade.php` (+1 -1) 📝 `resources/views/layouts/parts/header-user-menu.blade.php` (+8 -13) 📝 `resources/views/settings/layout.blade.php` (+1 -1) ➕ `resources/views/users/account/auth.blade.php` (+87 -0) ➕ `resources/views/users/account/delete.blade.php` (+43 -0) ➕ `resources/views/users/account/layout.blade.php` (+29 -0) ➕ `resources/views/users/account/notifications.blade.php` (+71 -0) _...and 21 more files_ </details> ### 📄 Description This is intended to re-organise the various user options and controls, to bring all user-facing controls into a cohesive "my-account" area. This includes the creation of new "my-account" profile controls, so we can target and seperate the editing of "my-account" from that of admin controls which are intended to manage accounts that are not the current user (mostly). Means we can provide a UX intended for the seperate use-cases. ### Todo - [x] Add new my-account profile form. - [x] Ensure sidebar item highlighting works for all my-account items - [x] Update "External Auth" fields to always show (not be auth type specific, maybe hidden by default though). - [x] Have link from user profile to user admin profile form if permissions allow. - [x] Have link to user public activity profile. - [x] Update API token URLs and return user to correct location on save/cancel. - [x] Ensure translations extracted to files - [x] Provide user self-delete flow - [x] Clean up & split-out (if needed) old preference test cases. - [x] Clean up header profile dropdown menu. - [x] Specifically cover non-admin profile email field disabling/message with testing. - [x] Test across dark mode. - [x] Test with different auth methods. - [x] Re-test each action across all my-account and admin user management views. - [x] Testing ### Docs Updates - Advise of changes to URLs. - No /preferences URLs anymore. - API token URLs changed. - Old profile routes non-accessible without users-manage permission. ### Notes - Active/inactive social accounts can now be seen for users by admins (Previously only shown to current user). - External auth ID field is now always available regardless of auth option set. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:30:45 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6378