diff --git a/VERSION b/VERSION index fdc5de419..95f98aa67 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.0.11 +9.0.12 diff --git a/app/controllers/gdrive/browse_controller.rb b/app/controllers/gdrive/browse_controller.rb index e702d6b17..398a0842d 100644 --- a/app/controllers/gdrive/browse_controller.rb +++ b/app/controllers/gdrive/browse_controller.rb @@ -2,7 +2,7 @@ module GDrive class BrowseController < ApplicationController - before_action -> { nav_context(:files, :gdrive) } + before_action -> { nav_context(:wiki, :gdrive) } def index @browse_decorator = BrowseDecorator.new diff --git a/app/controllers/gdrive/item_groups_controller.rb b/app/controllers/gdrive/item_groups_controller.rb index 1acb7ed23..3c6de4eea 100644 --- a/app/controllers/gdrive/item_groups_controller.rb +++ b/app/controllers/gdrive/item_groups_controller.rb @@ -4,7 +4,7 @@ module GDrive class ItemGroupsController < ApplicationController include Destructible - before_action -> { nav_context(:files, :gdrive) } + before_action -> { nav_context(:wiki, :gdrive) } def new @item = Item.find(params[:item_id]) diff --git a/app/controllers/gdrive/items_controller.rb b/app/controllers/gdrive/items_controller.rb index 24f2be13a..986f12c5e 100644 --- a/app/controllers/gdrive/items_controller.rb +++ b/app/controllers/gdrive/items_controller.rb @@ -4,7 +4,7 @@ module GDrive class ItemsController < ApplicationController include Destructible - before_action -> { nav_context(:files, :gdrive) } + before_action -> { nav_context(:wiki, :gdrive) } before_action :load_config helper_method :sample_item diff --git a/app/controllers/gdrive/migration/dashboard/files_controller.rb b/app/controllers/gdrive/migration/dashboard/files_controller.rb index 57c26c3cf..c93d4d8e0 100644 --- a/app/controllers/gdrive/migration/dashboard/files_controller.rb +++ b/app/controllers/gdrive/migration/dashboard/files_controller.rb @@ -4,7 +4,7 @@ module GDrive module Migration module Dashboard class FilesController < ApplicationController - before_action -> { nav_context(:files, :gdrive, :migration, :dashboard, :files) } + before_action -> { nav_context(:wiki, :gdrive, :migration, :dashboard, :files) } def index @main_config = MainConfig.find_by(community: current_community) diff --git a/app/controllers/gdrive/migration/dashboard/owners_controller.rb b/app/controllers/gdrive/migration/dashboard/owners_controller.rb index ebf08fa24..d0859bf03 100644 --- a/app/controllers/gdrive/migration/dashboard/owners_controller.rb +++ b/app/controllers/gdrive/migration/dashboard/owners_controller.rb @@ -4,7 +4,7 @@ module GDrive module Migration module Dashboard class OwnersController < ApplicationController - before_action -> { nav_context(:files, :gdrive, :migration, :dashboard, :owners) } + before_action -> { nav_context(:wiki, :gdrive, :migration, :dashboard, :owners) } def index @main_config = MainConfig.find_by(community: current_community) diff --git a/app/controllers/gdrive/migration/dashboard/status_controller.rb b/app/controllers/gdrive/migration/dashboard/status_controller.rb index 6c433f2d0..0b3c69efc 100644 --- a/app/controllers/gdrive/migration/dashboard/status_controller.rb +++ b/app/controllers/gdrive/migration/dashboard/status_controller.rb @@ -4,7 +4,7 @@ module GDrive module Migration module Dashboard class StatusController < ApplicationController - before_action -> { nav_context(:files, :gdrive, :migration, :dashboard, :status) } + before_action -> { nav_context(:wiki, :gdrive, :migration, :dashboard, :status) } def show authorize(current_community, :setup?, policy_class: SetupPolicy) diff --git a/app/controllers/gdrive/setup/auth_controller.rb b/app/controllers/gdrive/setup/auth_controller.rb index ce51cdd05..e9a0b2da8 100644 --- a/app/controllers/gdrive/setup/auth_controller.rb +++ b/app/controllers/gdrive/setup/auth_controller.rb @@ -11,7 +11,7 @@ module Setup class AuthController < ApplicationController USERINFO_URL = "https://www.googleapis.com/oauth2/v2/userinfo?access_token=" - before_action -> { nav_context(:files, :gdrive, :setup, :auth) } + before_action -> { nav_context(:wiki, :gdrive, :setup, :auth) } # We can't use a subdomain on this page due to Google API restrictions. prepend_before_action :set_current_community_from_callback_state, only: :callback diff --git a/app/decorators/nav/builder.rb b/app/decorators/nav/builder.rb index daa0fcffb..7b7693642 100644 --- a/app/decorators/nav/builder.rb +++ b/app/decorators/nav/builder.rb @@ -60,16 +60,10 @@ def main_items(display:) ) items << customizer.filter_item( name: :wiki, - path: "/wiki", + path: h.wiki_pages_path, permitted: h.policy(sample_wiki_page).show?, icon: "info-circle" ) - items << customizer.filter_item( - name: :files, - path: h.gdrive_home_path, - permitted: GDrive::BrowsePolicy.new(user, :folder).index?, - icon: "file" - ) items << customizer.filter_item( name: :billing, path: h.accounts_path, @@ -273,11 +267,19 @@ def sub_items(main_item = nil) icon: "copy" } ] - when :files + when :wiki + sample_wiki_page = Wiki::Page.new(community: community) [ + { + name: :wiki, + parents: :wiki, + path: h.wiki_pages_path, + permitted: h.policy(sample_wiki_page).show?, + icon: "info-circle" + }, { name: :gdrive, - parents: :files, + parents: :wiki, path: h.gdrive_home_path, permitted: GDrive::BrowsePolicy.new(user, :folder).index?, icon: {name: "google", style: :brands} @@ -309,21 +311,21 @@ def sub_sub_items path: h.people_member_types_path, permitted: h.policy(sample_member_type).index? }] - elsif context[0..3] == %i[files gdrive migration dashboard] + elsif context[0..3] == %i[wiki gdrive migration dashboard] depth = 4 [{ name: :status, - parents: %i[files gdrive migration dashboard], + parents: %i[wiki gdrive migration dashboard], path: h.gdrive_migration_dashboard_status_path, permitted: GDrive::SetupPolicy.new(user, community).setup? }, { name: :owners, - parents: %i[files gdrive migration dashboard], + parents: %i[wiki gdrive migration dashboard], path: h.gdrive_migration_dashboard_owners_path, permitted: GDrive::SetupPolicy.new(user, community).setup? }, { name: :files, - parents: %i[files gdrive migration dashboard], + parents: %i[wiki gdrive migration dashboard], path: h.gdrive_migration_dashboard_files_path, permitted: GDrive::SetupPolicy.new(user, community).setup? }] diff --git a/app/views/gdrive/browse/index.html.erb b/app/views/gdrive/browse/index.html.erb index 103f48567..c5dd907f3 100644 --- a/app/views/gdrive/browse/index.html.erb +++ b/app/views/gdrive/browse/index.html.erb @@ -1,4 +1,4 @@ -<% content_for(:title) { "Files" } %> +<% content_for(:title) { "Google Drive" } %> <% content_for(:action_links) do %> <% if @setup_policy.setup? %> <% if @config && !@no_credentials && !@authorization_error %> diff --git a/app/views/gdrive/migration/consent/intro.html.erb b/app/views/gdrive/migration/consent/intro.html.erb index 8540e6028..d65f5a632 100644 --- a/app/views/gdrive/migration/consent/intro.html.erb +++ b/app/views/gdrive/migration/consent/intro.html.erb @@ -32,5 +32,5 @@ If you'd rather not help with this effort, you can <%= link_to("opt out", gdrive_migration_consent_opt_out_path) %>.

- <%= link_to("Yes, I am ready help!", gdrive_migration_consent_auth_url, class: "btn btn-primary") %> + <%= link_to("Yes, I am ready to help!", gdrive_migration_consent_auth_url, class: "btn btn-primary") %> diff --git a/config/locales/en/nav.yml b/config/locales/en/nav.yml index 0f3707c51..f689a3978 100644 --- a/config/locales/en/nav.yml +++ b/config/locales/en/nav.yml @@ -31,8 +31,8 @@ en: protocols: "Protocols" wiki: _self: "Wiki" - files: - _self: "Files" + wiki: + _self: "Wiki" gdrive: _self: "Google Drive" migration: diff --git a/lib/gather/error_reporter.rb b/lib/gather/error_reporter.rb index 3e5abac99..f0f79e6dc 100644 --- a/lib/gather/error_reporter.rb +++ b/lib/gather/error_reporter.rb @@ -7,7 +7,7 @@ class ErrorReporter def report(error, env: nil, data: nil) if Settings.error_reporting == "sentry" && Rails.env.production? Sentry.with_scope do |scope| - scope.set_context("Gather", env: env, data: data) + scope.set_context("Gather", data.merge(request_env: env)) Sentry.capture_exception(error) end elsif Settings.error_reporting == "email"