Skip to content

Commit

Permalink
Merge pull request #216 from munen/feature/73378326/insider-log
Browse files Browse the repository at this point in the history
logs are exposed to insiders
  • Loading branch information
munen committed Jun 19, 2014
2 parents 74584ee + 2f00d0a commit 4763817
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
window.Livepage = angular.module 'Livepage', []

configFunc = ($logProvider) ->
$logProvider.debugEnabled <%= !Settings.disable_js_debugging %>
$logProvider.debugEnabled window.debug or window.insider

configFunc.$inject = ['$logProvider']
window.Livepage.config configFunc




2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def for_select
end

def insider?
email =~ /@voicerepublic.com^/
!!(email =~ /@voicerepublic.com$/)
end

end
3 changes: 3 additions & 0 deletions app/views/talks/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,8 @@
= t('.just_listening_in')

.scripts
:javascript
window.debug = #{!Settings.disable_js_debugging};
window.insider = #{current_user.insider?};
= javascript_include_tag 'livepage'
= render 'config'

0 comments on commit 4763817

Please sign in to comment.