diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cf711fc0..79360403 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -23,15 +23,15 @@ class UsersController < ApplicationController if user_params[:password] == '' && user_params[:password_confirmation] == '' # not trying to change the password if @user.update_attributes(user_params.except(:password, :password_confirmation)) - update_follow_settings(@user, params[:settings]) if is_tester(@user) + update_follow_settings(@user, params[:settings]) @user.image = nil if params[:remove_image] == '1' @user.save - sign_in(@user, bypass: true) + bypass_sign_in(@user) respond_to do |format| format.html { redirect_to root_url, notice: 'Settings updated' } end else - sign_in(@user, bypass: true) + bypass_sign_in(@user) respond_to do |format| format.html { redirect_to edit_user_path(@user), notice: @user.errors.to_a[0] } end diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb index 8434baca..bab6b6fb 100644 --- a/app/services/follow_service.rb +++ b/app/services/follow_service.rb @@ -3,7 +3,7 @@ class FollowService class << self def follow(entity, user, reason) - return unless user && is_tester(user) + return unless user return if (reason == 'created' || reason == 'contributed') && !should_auto_follow(entity, user, reason) diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 0bd2a366..4ea6130f 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -45,24 +45,22 @@ <%= form.check_box :emails_allowed, class: 'inline' %> Send Metamaps notifications to my email. <% end %> - <% if is_tester(@user) %> - <%= fields_for :settings, @user.settings do |settings| %> - <%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %> - <%= settings.check_box :follow_topic_on_created, class: 'inline' %> - Auto-follow topics you create. - <% end %> - <%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %> - <%= settings.check_box :follow_topic_on_contributed, class: 'inline' %> - Auto-follow topics you edit. - <% end %> - <%= settings.label :follow_map_on_created, class: 'firstFieldText' do %> - <%= settings.check_box :follow_map_on_created, class: 'inline' %> - Auto-follow maps you create. - <% end %> - <%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %> - <%= settings.check_box :follow_map_on_contributed, class: 'inline' %> - Auto-follow maps you edit. - <% end %> + <%= fields_for :settings, @user.settings do |settings| %> + <%= settings.label :follow_topic_on_created, class: 'firstFieldText' do %> + <%= settings.check_box :follow_topic_on_created, class: 'inline' %> + Auto-follow topics you create. + <% end %> + <%= settings.label :follow_topic_on_contributed, class: 'firstFieldText' do %> + <%= settings.check_box :follow_topic_on_contributed, class: 'inline' %> + Auto-follow topics you edit + <% end %> + <%= settings.label :follow_map_on_created, class: 'firstFieldText' do %> + <%= settings.check_box :follow_map_on_created, class: 'inline' %> + Auto-follow maps you create. + <% end %> + <%= settings.label :follow_map_on_contributed, class: 'firstFieldText' do %> + <%= settings.check_box :follow_map_on_contributed, class: 'inline' %> + Auto-follow maps you edit. <% end %> <% end %> diff --git a/frontend/src/components/Maps/MapCard.js b/frontend/src/components/Maps/MapCard.js index bd1b137c..43dae0d4 100644 --- a/frontend/src/components/Maps/MapCard.js +++ b/frontend/src/components/Maps/MapCard.js @@ -38,7 +38,7 @@ class Menu extends Component { } diff --git a/frontend/src/components/TopicCard/index.js b/frontend/src/components/TopicCard/index.js index e3297dad..2efcf9b6 100644 --- a/frontend/src/components/TopicCard/index.js +++ b/frontend/src/components/TopicCard/index.js @@ -53,7 +53,7 @@ class ReactTopicCard extends Component { authorizedToEdit={authorizedToEdit} updateTopic={wrappedUpdateTopic} /> - {Util.isTester(currentUser) && } +