diff --git a/README.md b/README.md
index a8ebf60..7aab06f 100644
--- a/README.md
+++ b/README.md
@@ -237,6 +237,7 @@ There are some config settings you need to change in the files below.
| `CMD_OAUTH2_AUTHORIZATION_URL` | `https://example.com` | authorization URL of your provider, please refer to the documentation of your OAuth2 provider (no default value) |
| `CMD_OAUTH2_CLIENT_ID` | `afae02fckafd...` | you will get this from your OAuth2 provider when you register CodiMD as OAuth2-client, (no default value) |
| `CMD_OAUTH2_CLIENT_SECRET` | `afae02fckafd...` | you will get this from your OAuth2 provider when you register CodiMD as OAuth2-client, (no default value) |
+| `CMD_OAUTH2_PROVIDERNAME` | `My institution` | Optional name to be displayed at login form indicating the oAuth2 provider |
| `CMD_IMGUR_CLIENTID` | no example | Imgur API client id |
| `CMD_EMAIL` | `true` or `false` | set to allow email signin |
| `CMD_ALLOW_PDF_EXPORT` | `true` or `false` | Enable or disable PDF exports |
diff --git a/lib/config/default.js b/lib/config/default.js
index acfc215..c3ada98 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -78,6 +78,7 @@ module.exports = {
},
// authentication
oauth2: {
+ providerName: undefined,
authorizationURL: undefined,
tokenURL: undefined,
clientID: undefined,
diff --git a/lib/config/environment.js b/lib/config/environment.js
index 65bacb4..6737637 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -75,6 +75,7 @@ module.exports = {
clientSecret: process.env.CMD_MATTERMOST_CLIENTSECRET
},
oauth2: {
+ providerName: process.env.CMD_OAUTH2_PROVIDERNAME,
baseURL: process.env.CMD_OAUTH2_BASEURL,
userProfileURL: process.env.CMD_OAUTH2_USER_PROFILE_URL,
userProfileUsernameAttr: process.env.CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR,
diff --git a/lib/response.js b/lib/response.js
index 9f1740c..4f572e4 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -591,7 +591,7 @@ function gitlabActionProjects (req, res, note) {
ret.accesstoken = user.accessToken
ret.profileid = user.profileid
request(
- config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?access_token=' + user.accessToken,
+ config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?membership=yes&per_page=100&access_token=' + user.accessToken,
function (error, httpResponse, body) {
if (!error && httpResponse.statusCode === 200) {
ret.projects = JSON.parse(body)
diff --git a/package.json b/package.json
index fdca9ca..08e39b2 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"express-session": "^1.14.2",
"file-saver": "^1.3.3",
"flowchart.js": "^1.6.4",
- "font-awesome": "^4.7.0",
+ "fork-awesome": "^1.1.3",
"formidable": "^1.0.17",
"gist-embed": "~2.6.0",
"graceful-fs": "^4.1.11",
diff --git a/public/js/index.js b/public/js/index.js
index 1330dea..3dd25fa 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1479,7 +1479,7 @@ $('#snippetExportModalConfirm').click(function () {
file_name: $('#snippetExportModalFileName').val(),
code: editor.getValue(),
visibility_level: $('#snippetExportModalVisibility').val(),
- visibility: $('#snippetExportModalVisibility').val() === 0 ? 'private' : ($('#snippetExportModalVisibility').val() === 10 ? 'internal' : '')
+ visibility: $('#snippetExportModalVisibility').val() === '0' ? 'private' : ($('#snippetExportModalVisibility').val() === '10' ? 'internal' : 'private')
}
if (!data.title || !data.file_name || !data.code || !data.visibility_level || !$('#snippetExportModalProjects').val()) return
diff --git a/public/views/codimd/head.ejs b/public/views/codimd/head.ejs
index 1f44625..b76eb70 100644
--- a/public/views/codimd/head.ejs
+++ b/public/views/codimd/head.ejs
@@ -9,7 +9,7 @@
<% if(useCDN) { %>
-
+
diff --git a/public/views/html.hbs b/public/views/html.hbs
index a87bf81..cc08b6f 100644
--- a/public/views/html.hbs
+++ b/public/views/html.hbs
@@ -16,7 +16,7 @@
-
+
diff --git a/public/views/index/head.ejs b/public/views/index/head.ejs
index c5cc7b6..cb3d51f 100644
--- a/public/views/index/head.ejs
+++ b/public/views/index/head.ejs
@@ -11,7 +11,7 @@
<% if(useCDN) { %>
-
+
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 4c2fc0a..a20f229 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -19,7 +19,7 @@
<% if(useCDN) { %>
-
+
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index c11d298..2b069f2 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -16,7 +16,7 @@
<% if(useCDN) { %>
-
+
diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js
index 19d021d..8df19b7 100644
--- a/webpackBaseConfig.js
+++ b/webpackBaseConfig.js
@@ -184,7 +184,7 @@ module.exports = {
],
'cover-styles-pack': [
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
- path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
+ path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
path.join(__dirname, 'public/css/bootstrap-social.css'),
path.join(__dirname, 'node_modules/select2/select2.css'),
path.join(__dirname, 'node_modules/select2/select2-bootstrap.css')
@@ -236,7 +236,7 @@ module.exports = {
],
'index-styles-pack': [
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
- path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
+ path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
path.join(__dirname, 'public/css/bootstrap-social.css'),
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
@@ -287,7 +287,7 @@ module.exports = {
],
'pretty-styles-pack': [
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
- path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
+ path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
],
@@ -324,7 +324,7 @@ module.exports = {
path.join(__dirname, 'public/css/markdown.css')
],
'slide-styles-pack': [
- path.join(__dirname, 'node_modules/font-awesome/css/font-awesome.min.css'),
+ path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
path.join(__dirname, 'node_modules/octicons/build/octicons.css')
],
diff --git a/yarn.lock b/yarn.lock
index 5d92bbc..ef1be26 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4150,11 +4150,6 @@ flush-write-stream@^1.0.0:
inherits "^2.0.1"
readable-stream "^2.0.4"
-font-awesome@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
- integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=
-
for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -4179,6 +4174,11 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+fork-awesome@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/fork-awesome/-/fork-awesome-1.1.3.tgz#820403b860a8f8bb90c3e0d8509c81b42ae2dcf8"
+ integrity sha512-pjeV0OWPbl/EiZJ64nsxB0ATGyG+e0/mnOI/BFlwT+171P2/2eI96KaRHy8ySZTdXG/lCCdffs7dODGm0hDBXg==
+
form-data@1.0.0-rc3:
version "1.0.0-rc3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.0-rc3.tgz#d35bc62e7fbc2937ae78f948aaa0d38d90607577"