FIX: Include parameters in function call

This commit is contained in:
David Taylor 2018-08-08 10:09:22 +01:00
parent ba6f11c521
commit 575d9e0b1a
1 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import { default as computed } from "ember-addons/ember-computed-decorators";
import { default as DiscourseURL, userPath } from "discourse/lib/url";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { findAll } from "discourse/models/login-method";
import { getOwner } from "discourse-common/lib/get-owner";
export default Ember.Controller.extend({
loading: false,
@ -33,7 +34,13 @@ export default Ember.Controller.extend({
@computed
displayOAuthWarning() {
return findAll().length > 0;
return (
findAll(
this.siteSettings,
getOwner(this).lookup("capabilities:main"),
this.site.isMobileDevice
).length > 0
);
},
toggleSecondFactor(enable) {