Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lockdown

commit e964fa6f158608558f15527574fef2259ae6ec8a 1 parent 2afe883
@holman holman authored
Showing with 8 additions and 4 deletions.
  1. +6 −4 app/app.rb
  2. +1 −0  app/play.rb
  3. +1 −0  config/play.example.yml
View
10 app/app.rb
@@ -77,7 +77,11 @@ def login
end
else
- authenticate!
+ if Play.config.gh_org != ''
+ github_organization_authenticate!(Play.config.gh_org)
+ else
+ authenticate!
+ end
user = User.find(github_user.login)
user ||= User.create(github_user.login,github_user.email)
end
@@ -108,7 +112,5 @@ def current_user
content_type :html
mustache :token, :layout => false
end
-
-
end
-end
+end
View
1  app/play.rb
@@ -8,6 +8,7 @@ def self.config
OpenStruct.new \
:secret => yaml['gh_secret'],
:client_id => yaml['gh_key'],
+ :gh_org => yaml['gh_org'],
:stream_url => yaml['stream_url'],
:office_url => yaml['office_url'],
:hostname => yaml['hostname'],
View
1  config/play.example.yml
@@ -1,5 +1,6 @@
gh_key: __OAUTH_KEY__
gh_secret: __OAUTH_SECRET__
+gh_org: __GITHUB_ORG__
pusher_app_id: __PUSHER_APP_ID__
pusher_key: __PUSHER_KEY__
pusher_secret: __PUSHER_SECRET__

1 comment on commit e964fa6

@philipp-spiess

I like this one :>

Please sign in to comment.
Something went wrong with that request. Please try again.