From 02e99277146d8bd912f2f19af1d3e94a6181d90d Mon Sep 17 00:00:00 2001 From: alecdwm Date: Tue, 13 Dec 2016 22:31:35 +0100 Subject: Initial support for LDAP server authentication Limitations as of this commit: - tlsOptions can only be specified in config.json, not as env vars - authentication failures are not yet gracefully handled by the UI - instead the error message is shown on a blank page (/auth/ldap) - no email address is associated with the LDAP user's account - no picture/profile URL is associated with the LDAP user's account - we might have to generate our own access + refresh tokens, because we aren't using oauth. The currently generated tokens are just a placeholder. - 'LDAP Sign in' needs to be translated to each locale --- public/views/index.ejs | 5 +++-- public/views/signin-ldap-modal.ejs | 35 +++++++++++++++++++++++++++++++++++ public/views/signin-modal.ejs | 10 ++++++++-- 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 public/views/signin-ldap-modal.ejs (limited to 'public/views') diff --git a/public/views/index.ejs b/public/views/index.ejs index 2bec7de0..baca1417 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -57,7 +57,7 @@ <% if (errorMessage && errorMessage.length > 0) { %>
<%= errorMessage %>
<% } %> - <% if(facebook || twitter || github || gitlab || dropbox || google || email) { %> + <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %>
<%= __('Sign In') %> @@ -93,7 +93,7 @@
style="display:none;"<% } %>> - <% if(facebook || twitter || github || gitlab || dropbox || google || email) { %> + <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %> @@ -192,6 +192,7 @@
<%- include signin-modal %> + <%- include signin-ldap-modal %> <% if(useCDN) { %> diff --git a/public/views/signin-ldap-modal.ejs b/public/views/signin-ldap-modal.ejs new file mode 100644 index 00000000..6a665f17 --- /dev/null +++ b/public/views/signin-ldap-modal.ejs @@ -0,0 +1,35 @@ + + diff --git a/public/views/signin-modal.ejs b/public/views/signin-modal.ejs index acbad256..ba6c57ff 100644 --- a/public/views/signin-modal.ejs +++ b/public/views/signin-modal.ejs @@ -38,7 +38,13 @@ <%= __('Sign in via %s', 'Google') %> <% } %> - <% if((facebook || twitter || github || gitlab || dropbox || google) && email) { %> + <% if(ldap) { %> + + <%= __('Sign in via %s', 'LDAP') %> + + <% } %> + + <% if((facebook || twitter || github || gitlab || dropbox || google || ldap) && email) { %>
<% }%> <% if(email) { %> @@ -67,4 +73,4 @@ - \ No newline at end of file + -- cgit v1.2.3 From 72a0e90f7d09d8a4e06a2629dcb9404eb37c64a0 Mon Sep 17 00:00:00 2001 From: alecdwm Date: Wed, 14 Dec 2016 12:42:42 +0100 Subject: LDAP signin form moved to main signin-modal - previously was a separate modal - now is located on main modal, like email auth --- public/views/index.ejs | 1 - public/views/signin-ldap-modal.ejs | 35 ----------------------------------- public/views/signin-modal.ejs | 27 +++++++++++++++++++++++---- 3 files changed, 23 insertions(+), 40 deletions(-) delete mode 100644 public/views/signin-ldap-modal.ejs (limited to 'public/views') diff --git a/public/views/index.ejs b/public/views/index.ejs index baca1417..39674b02 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -192,7 +192,6 @@ <%- include signin-modal %> - <%- include signin-ldap-modal %> <% if(useCDN) { %> diff --git a/public/views/signin-ldap-modal.ejs b/public/views/signin-ldap-modal.ejs deleted file mode 100644 index 6a665f17..00000000 --- a/public/views/signin-ldap-modal.ejs +++ /dev/null @@ -1,35 +0,0 @@ - - diff --git a/public/views/signin-modal.ejs b/public/views/signin-modal.ejs index ba6c57ff..e71b09c6 100644 --- a/public/views/signin-modal.ejs +++ b/public/views/signin-modal.ejs @@ -38,12 +38,31 @@ <%= __('Sign in via %s', 'Google') %> <% } %> + <% if((facebook || twitter || github || gitlab || dropbox || google) && ldap) { %> +
+ <% }%> <% if(ldap) { %> - - <%= __('Sign in via %s', 'LDAP') %> - +

Via LDAP

+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
<% } %> - <% if((facebook || twitter || github || gitlab || dropbox || google || ldap) && email) { %>
<% }%> -- cgit v1.2.3 From ff545b268871be7b6552638427a59a9a6eac5dd1 Mon Sep 17 00:00:00 2001 From: neopostmodern Date: Mon, 9 Jan 2017 12:49:23 +0100 Subject: Allow displaying LDAP provider name on sign-in modal --- public/views/signin-modal.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/views') diff --git a/public/views/signin-modal.ejs b/public/views/signin-modal.ejs index 7c52e0f3..e9c54b33 100644 --- a/public/views/signin-modal.ejs +++ b/public/views/signin-modal.ejs @@ -42,7 +42,7 @@
<% }%> <% if(ldap) { %> -

Via LDAP

+

Via <% if (ldap.providerName) { %> <%- ldap.providerName %> (LDAP) <% } else { %> LDAP <% } %>

-- cgit v1.2.3 From 89b8ddeabae81fd3a8891ce9d8191fbc9e27c83c Mon Sep 17 00:00:00 2001 From: 蒼時弦也 Date: Tue, 10 Jan 2017 10:02:37 +0800 Subject: Add limited and protected permission --- public/views/body.ejs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'public/views') diff --git a/public/views/body.ejs b/public/views/body.ejs index 83a82fa3..79e36141 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -19,6 +19,8 @@
  • Editable - Signed people can edit
  • Locked - Only owner can edit
  • Private - Only owner can view & edit
  • +
  • Limited - Signed people can edit & view
  • +
  • Protected - Only owner can edit
  • Delete this note
  • -- cgit v1.2.3 From 7b02c48d93d05e3ced0a030a13d620559710c9cd Mon Sep 17 00:00:00 2001 From: 蒼時弦也 Date: Tue, 10 Jan 2017 14:13:30 +0800 Subject: Adjust permission order to more clarly --- public/views/body.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public/views') diff --git a/public/views/body.ejs b/public/views/body.ejs index 79e36141..988d4f5b 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -17,10 +17,10 @@ -- cgit v1.2.3 From a9fe43ac3a38f036d4f9baa27c50fc9b5fea8c1f Mon Sep 17 00:00:00 2001 From: 蒼時弦也 Date: Tue, 10 Jan 2017 17:22:57 +0800 Subject: Update limited/protected permission icon --- public/views/body.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public/views') diff --git a/public/views/body.ejs b/public/views/body.ejs index 988d4f5b..6500e607 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -17,9 +17,9 @@