Remove switch organizations tab from settings and clear Rails cache for PUT /admin/organizations (#3045)

* Remove switch organization functionality

* Touch profile_updated_at when updating org
This commit is contained in:
Andy Zhao 2019-06-05 19:01:34 -04:00 committed by Ben Halpern
parent df44cbd254
commit 982658d3ab
3 changed files with 8 additions and 7 deletions

View file

@ -8,6 +8,11 @@ module Admin
# @resources = Organization.all.paginate(10, params[:page])
# end
def update
super
@requested_resource.touch(:profile_updated_at)
end
# Define a custom finder by overriding the `find_resource` method:
# def find_resource(param)
# Organization.find_by!(slug: param)

View file

@ -404,16 +404,16 @@ class User < ApplicationRecord
end
def settings_tab_list
tab_list = %w[
%w[
Profile
Integrations
Notifications
Publishing\ from\ RSS
Organization
Billing
Account
Misc
]
tab_list << "Switch Organizations" if has_role?(:switch_between_orgs)
tab_list.push("Account", "Misc")
end
def profile_image_90

View file

@ -1,4 +0,0 @@
<% if @user.has_role?(:switch_between_orgs) %>
<h1 style="color:#00cc44">Hey Mary 👋</h1>
<%= render "users/org_non_member" %>
<% end %>