diff options
author | Wu Cheng-Han | 2017-03-14 18:04:23 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2017-03-14 18:04:23 +0800 |
commit | 506a381eca5e2bdc31d3529ecd3f1f7797551406 (patch) | |
tree | 99e91e926d3a30a2ecba7c5b3ef7af47efd08cfe /app.js | |
parent | baf13072c1eedf5bb8ba126059043241d104a99a (diff) |
Add config option for gitlab api scope and auto adapt gitlab snippet feature on it
Diffstat (limited to '')
-rw-r--r-- | app.js | 6 | ||||
-rw-r--r-- | app.json | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -335,8 +335,10 @@ if (config.github) { successReturnToOrRedirect: config.serverurl + '/', failureRedirect: config.serverurl + '/' })) - // github callback actions - app.get('/auth/github/callback/:noteId/:action', response.githubActions) + if (!config.gitlab.scope || config.gitlab.scope === 'api') { + // gitlab callback actions + app.get('/auth/gitlab/callback/:noteId/:action', response.gitlabActions) + } } // gitlab auth if (config.gitlab) { @@ -89,6 +89,10 @@ "description": "GitLab API client secret", "required": false }, + "HMD_GITLAB_SCOPE": { + "description": "GitLab API client scope (optional)", + "required": false + }, "HMD_DROPBOX_CLIENTID": { "description": "Dropbox API client id", "required": false |