File tree Expand file tree Collapse file tree 6 files changed +16
-17
lines changed
Expand file tree Collapse file tree 6 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,11 @@ gem 'redcarpet' #markdown formatting
5757# Analytics
5858gem 'mixpanel-ruby'
5959gem 'barnes'
60-
61- # Sharing
62- gem 'social-share-button'
60+ gem 'skylight'
6361
6462# Apps
6563#gem 'easy_translate'
66- gem 'levenshtein-ffi'
64+ # gem 'levenshtein-ffi'
6765
6866# Forum
6967gem 'thredded'
Original file line number Diff line number Diff line change 236236 kaminari-core (= 1.1.1 )
237237 kaminari-core (1.1.1 )
238238 kramdown (1.17.0 )
239- levenshtein-ffi (1.1.0 )
240- ffi (~> 1.9 )
241239 libv8 (6.7.288.46.1 )
242240 listen (3.1.5 )
243241 rb-fsevent (~> 0.9 , >= 0.9.4 )
460458 json (>= 1.8 , < 3 )
461459 simplecov-html (~> 0.10.0 )
462460 simplecov-html (0.10.2 )
461+ skylight (3.1.2 )
462+ skylight-core (= 3.1.2 )
463+ skylight-core (3.1.2 )
464+ activesupport (>= 4.2.0 )
463465 slack-notifier (2.3.2 )
464- social-share-button (1.1.0 )
465- coffee-rails
466466 sprockets (3.7.2 )
467467 concurrent-ruby (~> 1.0 )
468468 rack (> 1 , < 3 )
@@ -562,7 +562,6 @@ DEPENDENCIES
562562 guard
563563 guard-minitest
564564 guard-rubocop
565- levenshtein-ffi
566565 material_icons
567566 medium-editor-rails
568567 memory_profiler
@@ -596,8 +595,8 @@ DEPENDENCIES
596595 serendipitous !
597596 shoulda-matchers (~> 3.1 )
598597 simplecov
598+ skylight
599599 slack-notifier
600- social-share-button
601600 sqlite3
602601 stackprof
603602 stripe
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ def index
4040 def show
4141 content_type = content_type_from_controller ( self . class )
4242 return redirect_to root_path unless valid_content_types . map ( &:name ) . include? ( content_type . name )
43- @content = content_type . find ( params [ :id ] )
43+ @content = content_type . find_by ( id : params [ :id ] )
44+ return redirect_to ( root_path , notice : "You don't have permission to view that content." ) if @content . nil?
4445 @serialized_content = ContentSerializer . new ( @content )
4546
4647 return redirect_to ( root_path ) if @content . user . nil? # deleted user's content
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ def index
44 end
55
66 def show
7- @user = User . find ( params [ :id ] )
7+ @user = User . find_by ( id : params [ :id ] )
8+ return redirect_to ( root_path , notice : 'That user does not exist.' ) if @user . nil?
9+
810 @content = @user . public_content . select { |type , list | list . any? }
911 @tabs = @content . keys
1012 @stream = @user . content_change_events . order ( 'updated_at desc' ) . limit ( 100 ) . group_by do |cce |
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ # The authentication token for the application.
3+ # I think this is actually ignored if the ENV var is set, but this is fine for reference / dummy data.
4+ authentication : ENV['SKYLIGHT_AUTHENTICATION']
You can’t perform that action at this time.
0 commit comments