mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Adding SSO CAS to Wekan
This commit is contained in:
parent
05869792ad
commit
ee81775dc8
6 changed files with 24 additions and 0 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue