summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.meteor/packages1
-rw-r--r--.meteor/versions1
-rw-r--r--client/components/main/layouts.jade3
-rw-r--r--client/components/main/layouts.js17
-rw-r--r--i18n/en.i18n.json1
-rw-r--r--settings.json1
6 files changed, 24 insertions, 0 deletions
diff --git a/.meteor/packages b/.meteor/packages
index 8f83280f..e76e15fb 100644
--- a/.meteor/packages
+++ b/.meteor/packages
@@ -85,3 +85,4 @@ browser-policy
eluck:accounts-lockout
rzymek:fullcalendar
momentjs:moment@2.22.2
+atoy40:accounts-cas \ No newline at end of file
diff --git a/.meteor/versions b/.meteor/versions
index a173e7e4..9de09a74 100644
--- a/.meteor/versions
+++ b/.meteor/versions
@@ -9,6 +9,7 @@ aldeed:simple-schema@1.5.3
alethes:pages@1.8.6
allow-deny@1.1.0
arillo:flow-router-helpers@0.5.2
+atoy40:accounts-cas@0.0.2
audit-argument-checks@1.0.7
autoupdate@1.3.12
babel-compiler@6.24.7
diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade
index 4d76aabb..911f23f4 100644
--- a/client/components/main/layouts.jade
+++ b/client/components/main/layouts.jade
@@ -17,6 +17,9 @@ template(name="userFormsLayout")
img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan")
section.auth-dialog
+Template.dynamic(template=content)
+ if isCas
+ .at-form
+ button#cas(class='at-btn submit' type='submit') {{casSignInLabel}}
div.at-form-lang
select.select-lang.js-userform-set-language
each languages
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index f12718a7..ab47c8ed 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -39,6 +39,16 @@ Template.userFormsLayout.helpers({
const curLang = T9n.getLanguage() || 'en';
return t9nTag === curLang;
},
+
+ isCas() {
+ return Meteor.settings.public &&
+ Meteor.settings.public.cas &&
+ Meteor.settings.public.cas.loginUrl
+ },
+
+ casSignInLabel() {
+ return TAPi18n.__('casSignIn', {}, T9n.getLanguage() || 'en');
+ },
});
Template.userFormsLayout.events({
@@ -47,6 +57,13 @@ Template.userFormsLayout.events({
T9n.setLanguage(i18nTagToT9n(i18nTag));
evt.preventDefault();
},
+ 'click button#cas'() {
+ Meteor.loginWithCas(function() {
+ if (FlowRouter.getRouteName() == 'atSignIn') {
+ FlowRouter.go('/');
+ }
+ });
+ },
});
Template.defaultLayout.events({
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 51a9b4cc..fa95f162 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -131,6 +131,7 @@
"cardMorePopup-title": "More",
"cards": "Cards",
"cards-count": "Cards",
+ "casSignIn" : "Sign In with CAS",
"change": "Change",
"change-avatar": "Change Avatar",
"change-password": "Change Password",
diff --git a/settings.json b/settings.json
new file mode 100644
index 00000000..9e26dfee
--- /dev/null
+++ b/settings.json
@@ -0,0 +1 @@
+{} \ No newline at end of file