From f9707d0385cfb1b70860f8bf49358973d64d7c8e Mon Sep 17 00:00:00 2001 From: Claire Carden Date: Fri, 5 Jan 2024 20:44:28 -0600 Subject: [PATCH 1/5] Updated browser title for the Edit Profile page. --- app/controllers/users_controller.rb | 4 +++- config/docker/database.yml | 2 +- docker-compose.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a1150badecc..47a64ab2d1b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -35,6 +35,7 @@ def show # GET /users/1/edit def edit + @page_title = ts("Edit Profile") authorize @user.profile if logged_in_as_admin? end @@ -126,10 +127,11 @@ def activate end def update - authorize @user.profile if logged_in_as_admin? + authorize @user.profile if logged_in_as_admin? if @user.profile.update(profile_params) if logged_in_as_admin? && @user.profile.ticket_url.present? + link = view_context.link_to("Ticket ##{@user.profile.ticket_number}", @user.profile.ticket_url) AdminActivity.log_action(current_admin, @user, action: "edit profile", summary: link) end diff --git a/config/docker/database.yml b/config/docker/database.yml index 6b2242bad06..64202ffe1c2 100644 --- a/config/docker/database.yml +++ b/config/docker/database.yml @@ -4,7 +4,7 @@ defaults: &defaults collation: utf8mb4_unicode_ci host: db username: root - password: change_me + password: "Password1!" development: database: otwarchive_development diff --git a/docker-compose.yml b/docker-compose.yml index e445604b9a7..eb1f530ec90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: db: image: mariadb:10.5.4-focal environment: - - MYSQL_ROOT_PASSWORD=change_me + - MYSQL_ROOT_PASSWORD="Password1!" ports: - "3306:3306" command: From acbc3f407e74f2327f532960ee5c5b63bc572e3a Mon Sep 17 00:00:00 2001 From: Claire Carden Date: Sat, 6 Jan 2024 12:15:45 -0600 Subject: [PATCH 2/5] added url to title --- app/controllers/users_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 47a64ab2d1b..4cb199d223f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -35,7 +35,7 @@ def show # GET /users/1/edit def edit - @page_title = ts("Edit Profile") + @page_title = ts("Edit Profile | #{ArchiveConfig.APP_NAME}") authorize @user.profile if logged_in_as_admin? end @@ -127,11 +127,9 @@ def activate end def update - authorize @user.profile if logged_in_as_admin? if @user.profile.update(profile_params) if logged_in_as_admin? && @user.profile.ticket_url.present? - link = view_context.link_to("Ticket ##{@user.profile.ticket_number}", @user.profile.ticket_url) AdminActivity.log_action(current_admin, @user, action: "edit profile", summary: link) end From 0626edcf97890c46b252ecb3ee0069be3b5e10d8 Mon Sep 17 00:00:00 2001 From: Claire Carden Date: Sat, 6 Jan 2024 12:21:44 -0600 Subject: [PATCH 3/5] putting passwords back to normal --- config/docker/database.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/docker/database.yml b/config/docker/database.yml index 64202ffe1c2..6b2242bad06 100644 --- a/config/docker/database.yml +++ b/config/docker/database.yml @@ -4,7 +4,7 @@ defaults: &defaults collation: utf8mb4_unicode_ci host: db username: root - password: "Password1!" + password: change_me development: database: otwarchive_development diff --git a/docker-compose.yml b/docker-compose.yml index eb1f530ec90..e445604b9a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: db: image: mariadb:10.5.4-focal environment: - - MYSQL_ROOT_PASSWORD="Password1!" + - MYSQL_ROOT_PASSWORD=change_me ports: - "3306:3306" command: From 4e177f670cc147b50a58201f784c12198fea776a Mon Sep 17 00:00:00 2001 From: Claire Carden Date: Sun, 7 Jan 2024 11:59:02 -0600 Subject: [PATCH 4/5] address PR feedback --- app/controllers/users_controller.rb | 2 +- config/locales/views/en.yml | 2 ++ features/other_a/profile_edit.feature | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4cb199d223f..b2ed959be2e 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -35,7 +35,7 @@ def show # GET /users/1/edit def edit - @page_title = ts("Edit Profile | #{ArchiveConfig.APP_NAME}") + @page_subtitle = t(".browser_title") authorize @user.profile if logged_in_as_admin? end diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 8358655434b..512ffe7683f 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -714,6 +714,8 @@ en: description: Recalculate the filters for this work based on the current set of tags. Use this option if wrangling seems to have gone wrong. (e.g. If you synned one of this work's tags to a canonical but it's not showing up in the tag listings, or if the wrong tags are listed in the sidebar when you drill down to a search that includes only this work.) title: Update Work Filters users: + edit: + browser_title: Edit Profile change_username: account_faq: Account FAQ caution: Please use this feature with caution. diff --git a/features/other_a/profile_edit.feature b/features/other_a/profile_edit.feature index d383bcf2941..62c61c8ba51 100644 --- a/features/other_a/profile_edit.feature +++ b/features/other_a/profile_edit.feature @@ -13,6 +13,7 @@ Background: Scenario: Add details + Then I should see the page title "Edit Profile" When I fill in the details of my profile Then I should see "Your profile has been successfully updated" And 0 emails should be delivered From d53519349c325c82ad0e70665b7896059343b966 Mon Sep 17 00:00:00 2001 From: Claire Carden Date: Sun, 7 Jan 2024 12:27:03 -0600 Subject: [PATCH 5/5] change en.yml --- config/locales/views/en.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 512ffe7683f..4e11ba32330 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -714,8 +714,6 @@ en: description: Recalculate the filters for this work based on the current set of tags. Use this option if wrangling seems to have gone wrong. (e.g. If you synned one of this work's tags to a canonical but it's not showing up in the tag listings, or if the wrong tags are listed in the sidebar when you drill down to a search that includes only this work.) title: Update Work Filters users: - edit: - browser_title: Edit Profile change_username: account_faq: Account FAQ caution: Please use this feature with caution. @@ -756,6 +754,8 @@ en: options_info: You can delete them, but please consider %{orphaning_link} them instead! works_summary: 'You have %{work_count} work(s) under the following pseuds: %{pseuds}.' submit: Save + edit: + browser_title: Edit Profile registrations: new: cancel: Cancel