FEATURE REMOVAL: persona login

see: https://meta.discourse.org/t/pulling-persona-out-of-discourse-core/12613
This commit is contained in:
Sam
2014-02-11 16:56:48 +11:00
parent fd34932068
commit 7ad00f426c
47 changed files with 2 additions and 178 deletions
@@ -35,19 +35,12 @@ Discourse.LoginMethod.reopenClass({
"cas",
"twitter",
"yahoo",
"github",
"persona"
"github"
].forEach(function(name){
if(Discourse.SiteSettings["enable_" + name + "_logins"]){
var params = {name: name};
if(name === "persona") {
params.customLogin = function(){
navigator.id.request();
};
}
if(name === "google") {
params.frameWidth = 850;
params.frameHeight = 500;
@@ -17,31 +17,6 @@ Discourse.LoginView = Discourse.ModalBodyView.extend({
this.set('controller.lastY', e.screenY);
},
initPersona: function(){
var readyCalled = false;
navigator.id.watch({
onlogin: function(assertion) {
if (readyCalled) {
Discourse.ajax('/auth/persona/callback', {
type: 'POST',
data: { 'assertion': assertion },
dataType: 'json'
}).then(function(data) {
Discourse.authenticationComplete(data);
});
}
},
onlogout: function() {
if (readyCalled) {
Discourse.logout();
}
},
onready: function() {
readyCalled = true;
}
});
},
didInsertElement: function() {
this._super();
@@ -64,11 +39,6 @@ Discourse.LoginView = Discourse.ModalBodyView.extend({
});
});
var view = this;
// load persona if needed
if(Discourse.SiteSettings.enable_persona_logins) {
$LAB.script("https://login.persona.org/include.js").wait(view.initPersona);
}
}
});
@@ -178,12 +178,6 @@ button {
content: "g";
}
}
&.persona {
background: $persona;
&:before {
content: "]";
}
}
}
// Button Sizes
@@ -22,7 +22,6 @@ $cas: #70BA61 !default;
$twitter: #00bced !default;
$yahoo: #810293 !default;
$github: #6d6d6d !default;
$persona: #606060 !default;
$primary: #333 !default;
@@ -11,7 +11,6 @@ class Users::OmniauthCallbacksController < ApplicationController
Auth::OpenIdAuthenticator.new("yahoo", "https://me.yahoo.com", trusted: true),
Auth::GithubAuthenticator.new,
Auth::TwitterAuthenticator.new,
Auth::PersonaAuthenticator.new,
Auth::CasAuthenticator.new
]
+1 -2
View File
@@ -7,5 +7,4 @@ Disallow: /auth/twitter/callback
Disallow: /auth/google/callback
Disallow: /auth/yahoo/callback
Disallow: /auth/github/callback
Disallow: /auth/persona/callback
Disallow: /auth/cas/callback
Disallow: /auth/cas/callback