Skip to content

Commit

Permalink
require public keys
Browse files Browse the repository at this point in the history
  • Loading branch information
lipp committed Apr 9, 2016
1 parent 3f04a30 commit 0710825
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/models/user.js
Expand Up @@ -158,7 +158,7 @@ userSchema.methods.hasRequiredGitHubAccess = function (done) {
done(err)
return
}
var requiredScopes = [ 'user:email', 'write:repo_hook', 'read:org', 'repo' ]
var requiredScopes = [ 'user:email', 'write:repo_hook', 'read:org' ]
var ok = requiredScopes.reduce(function (result, scope) {
return result && scopes.indexOf(scope) > -1
}, true)
Expand Down
2 changes: 1 addition & 1 deletion lib/server.js
Expand Up @@ -84,7 +84,7 @@ var init = function (port, initDone) {
app.use(slash())

router.get('/auth/github',
passport.authenticate('github', { scope: [ 'user:email', 'write:repo_hook', 'read:org', 'repo' ] }),
passport.authenticate('github', { scope: ['user:email', 'write:repo_hook', 'read:org'] }),
routes.authGithub.bind(routes))

router.get('/auth/github/callback',
Expand Down
2 changes: 1 addition & 1 deletion views/user.jade
Expand Up @@ -31,7 +31,7 @@ block content
.content
if owner.needsReauth == 'more-rights'
.header Sorry, Doclets needs more permissions.
p Doclets needs permissions to create webhooks, read organization membership and read private repositories (Private Repo Support coming soon). However, Doclets will <strong>never</strong> make changes to any repository content.
p Doclets needs permissions to create webhooks, read organization membership and read public repositories (Private Repo Support coming soon). However, Doclets will <strong>never</strong> make changes to any repository content.
else
.header Sorry, your GitHub authentication token seems invalid.
p This can have different reasons. Please re-authenticate next. <em>No</em> added repositories or Doclets will be lost.
Expand Down

0 comments on commit 0710825

Please sign in to comment.