mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Removed oauth experiment (#2390)
refs: https://github.com/TryGhost/Team/issues/1625 - this didn't work the way we wanted to - removing this will free up the namespaces to start over
This commit is contained in:
parent
8ba1cabc1e
commit
7521d69405
@ -1188,3 +1188,9 @@ remove|ember-template-lint|no-action|207|63|207|63|682c80ff5163c8e4a2bea89f2066d
|
|||||||
remove|ember-template-lint|no-action|216|59|216|59|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
remove|ember-template-lint|no-action|216|59|216|59|a80dd18e18dda6fb6f1f97d87bef2b8c2ce3d847|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
||||||
remove|ember-template-lint|no-passed-in-event-handlers|206|52|206|52|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
remove|ember-template-lint|no-passed-in-event-handlers|206|52|206|52|dcb4785647a50814bcfce82f8d68ac8dd8f54ec2|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
||||||
remove|ember-template-lint|no-passed-in-event-handlers|216|52|216|52|70487c008d7dda453fef82f0140699ee93c0055c|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
remove|ember-template-lint|no-passed-in-event-handlers|216|52|216|52|70487c008d7dda453fef82f0140699ee93c0055c|1652054400000|1662422400000|1665014400000|app/templates/settings/membership.hbs
|
||||||
|
remove|ember-template-lint|no-action|214|55|214|55|da852fe4064a61e18c07b15cb10e95b8ecc6666f|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
remove|ember-template-lint|no-action|215|51|215|51|271aabc30313a0e93dae42dbfc729b7cd0e0ecfd|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
remove|ember-template-lint|no-action|225|55|225|55|da852fe4064a61e18c07b15cb10e95b8ecc6666f|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
remove|ember-template-lint|no-action|226|51|226|51|4104427b3770f8810844e0c71c7b49f00cd4adc3|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
remove|ember-template-lint|no-passed-in-event-handlers|215|44|215|44|5d98389160e93540d9c809151effabc297a8a2a1|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
remove|ember-template-lint|no-passed-in-event-handlers|226|44|226|44|57b3bc0ba2625f4feb98ee4fae58805f88c075ca|1652054400000|1662422400000|1665014400000|app/templates/settings/labs.hbs
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
isRequestEntityTooLargeError,
|
isRequestEntityTooLargeError,
|
||||||
isUnsupportedMediaTypeError
|
isUnsupportedMediaTypeError
|
||||||
} from 'ghost-admin/services/ajax';
|
} from 'ghost-admin/services/ajax';
|
||||||
import {action, set} from '@ember/object';
|
import {action} from '@ember/object';
|
||||||
import {isBlank} from '@ember/utils';
|
import {isBlank} from '@ember/utils';
|
||||||
import {isArray as isEmberArray} from '@ember/array';
|
import {isArray as isEmberArray} from '@ember/array';
|
||||||
import {run} from '@ember/runloop';
|
import {run} from '@ember/runloop';
|
||||||
@ -58,7 +58,6 @@ export default class LabsController extends Controller {
|
|||||||
yamlExtension = null;
|
yamlExtension = null;
|
||||||
yamlMimeType = null;
|
yamlMimeType = null;
|
||||||
yamlAccept = null;
|
yamlAccept = null;
|
||||||
isOAuthConfigurationOpen = false;
|
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
super.init(...arguments);
|
super.init(...arguments);
|
||||||
@ -143,11 +142,6 @@ export default class LabsController extends Controller {
|
|||||||
this.utils.downloadFile(this.ghostPaths.url.api(endpoint));
|
this.utils.downloadFile(this.ghostPaths.url.api(endpoint));
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
|
||||||
async saveOAuthSettings() {
|
|
||||||
await this.settings.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
toggleDeleteAllModal() {
|
toggleDeleteAllModal() {
|
||||||
this.toggleProperty('showDeleteAllModal');
|
this.toggleProperty('showDeleteAllModal');
|
||||||
@ -158,18 +152,6 @@ export default class LabsController extends Controller {
|
|||||||
this.toggleProperty('showEarlyAccessModal');
|
this.toggleProperty('showEarlyAccessModal');
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
|
||||||
async toggleIsOAuthEnabled() {
|
|
||||||
if (this.isOAuthEnabled) {
|
|
||||||
this.settings.set('oauthClientId', '');
|
|
||||||
this.settings.set('oauthClientSecret', '');
|
|
||||||
set(this, 'isOAuthConfigurationOpen', false);
|
|
||||||
await this.settings.save();
|
|
||||||
} else {
|
|
||||||
set(this, 'isOAuthConfigurationOpen', true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a file selection dialog - Triggered by "Upload x" buttons,
|
* Opens a file selection dialog - Triggered by "Upload x" buttons,
|
||||||
* searches for the hidden file input within the .gh-setting element
|
* searches for the hidden file input within the .gh-setting element
|
||||||
|
@ -69,11 +69,7 @@ export default Model.extend(ValidationEngine, {
|
|||||||
stripeConnectLivemode: attr('boolean'),
|
stripeConnectLivemode: attr('boolean'),
|
||||||
stripeConnectDisplayName: attr('string'),
|
stripeConnectDisplayName: attr('string'),
|
||||||
stripeConnectAccountId: attr('string'),
|
stripeConnectAccountId: attr('string'),
|
||||||
/**
|
|
||||||
* OAuth settings
|
|
||||||
*/
|
|
||||||
oauthClientId: attr('string'),
|
|
||||||
oauthClientSecret: attr('string'),
|
|
||||||
/**
|
/**
|
||||||
* Editor settings
|
* Editor settings
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,6 @@ export default class FeatureService extends Service {
|
|||||||
|
|
||||||
// labs flags
|
// labs flags
|
||||||
@feature('dashboardV5') dashboardV5;
|
@feature('dashboardV5') dashboardV5;
|
||||||
@feature('oauthLogin') oauthLogin;
|
|
||||||
@feature('membersActivity') membersActivity;
|
@feature('membersActivity') membersActivity;
|
||||||
@feature('urlCache') urlCache;
|
@feature('urlCache') urlCache;
|
||||||
@feature('beforeAfterCard') beforeAfterCard;
|
@feature('beforeAfterCard') beforeAfterCard;
|
||||||
|
@ -29,7 +29,7 @@ export default class SettingsService extends Service.extend(_ProxyMixin, Validat
|
|||||||
_loadSettings() {
|
_loadSettings() {
|
||||||
if (!this._loadingPromise) {
|
if (!this._loadingPromise) {
|
||||||
this._loadingPromise = this.store
|
this._loadingPromise = this.store
|
||||||
.queryRecord('setting', {group: 'site,theme,private,members,portal,newsletter,email,amp,labs,slack,unsplash,views,firstpromoter,oauth,editor'})
|
.queryRecord('setting', {group: 'site,theme,private,members,portal,newsletter,email,amp,labs,slack,unsplash,views,firstpromoter,editor'})
|
||||||
.then((settings) => {
|
.then((settings) => {
|
||||||
this._loadingPromise = null;
|
this._loadingPromise = null;
|
||||||
return settings;
|
return settings;
|
||||||
|
@ -187,50 +187,6 @@
|
|||||||
<div class="gh-main-section">
|
<div class="gh-main-section">
|
||||||
<h4 class="gh-main-section-header small bn">Alpha Features</h4>
|
<h4 class="gh-main-section-header small bn">Alpha Features</h4>
|
||||||
<div class="gh-expandable">
|
<div class="gh-expandable">
|
||||||
<div class="gh-expandable-block">
|
|
||||||
<div class="gh-expandable-header">
|
|
||||||
<div>
|
|
||||||
<h4 class="gh-expandable-title">Google OAuth for staff users</h4>
|
|
||||||
<p class="gh-expandable-description">
|
|
||||||
Allow people to sign into Ghost Admin using Google SSO,
|
|
||||||
<a href="https://ghost.org/docs/tutorials/setting-up-oauth/" target="_blank" rel="noopener noreferrer">docs here</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="for-switch">
|
|
||||||
<GhFeatureFlag @flag="oauthLogin" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="gh-expandable-content">
|
|
||||||
{{#if this.feature.oauthLogin}}
|
|
||||||
<div class="gh-setting-content-extended gh-labs-sso-settings pt2 pb4">
|
|
||||||
<a href="https://console.developers.google.com/" target="_blank" rel="noopener noreferrer" class="gh-btn gh-btn-white mb4"><span>{{svg-jar "google-favicon"}}Configure Google OAuth</span></a>
|
|
||||||
<GhFormGroup @class="no-margin pt2" @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="password">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="aouth-client-id">Google OAuth Client ID</label>
|
|
||||||
<GhTextInput
|
|
||||||
id="oauth-client-id"
|
|
||||||
@value={{readonly this.settings.oauthClientId}}
|
|
||||||
@name="oauth-client-id"
|
|
||||||
@focus-out={{action "saveOAuthSettings"}}
|
|
||||||
@input={{action (mut this.settings.oauthClientId) value="target.value"}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="oauth-client-secret">Google OAuth Client Secret</label>
|
|
||||||
<GhTextInput
|
|
||||||
id="oauth-client-secret"
|
|
||||||
@value={{readonly this.settings.oauthClientSecret}}
|
|
||||||
@name="oauth-client-secret"
|
|
||||||
@focus-out={{action "saveOAuthSettings"}}
|
|
||||||
@input={{action (mut this.settings.oauthClientSecret) value="target.value"}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</GhFormGroup>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="gh-expandable-block">
|
<div class="gh-expandable-block">
|
||||||
<div class="gh-expandable-header">
|
<div class="gh-expandable-header">
|
||||||
<div>
|
<div>
|
||||||
|
@ -17,17 +17,6 @@
|
|||||||
<div class="gh-site-icon" style={{site-icon-style}}></div>
|
<div class="gh-site-icon" style={{site-icon-style}}></div>
|
||||||
<h1>Sign in to {{this.config.blogTitle}}.</h1>
|
<h1>Sign in to {{this.config.blogTitle}}.</h1>
|
||||||
</header>
|
</header>
|
||||||
{{#if this.config.oauth}}
|
|
||||||
<a
|
|
||||||
href="oauth/google"
|
|
||||||
class="login gh-btn gh-btn-login gh-btn-block gh-btn-white gh-btn-icon gh-center">
|
|
||||||
<span style="color: #15171a;">{{svg-jar "google-favicon"}}Sign in with Google</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="gh-separator">
|
|
||||||
or
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
<GhFormGroup @errors={{this.signin.errors}} @hasValidated={{this.hasValidated}} @property="identification">
|
<GhFormGroup @errors={{this.signin.errors}} @hasValidated={{this.hasValidated}} @property="identification">
|
||||||
<label>Email address</label>
|
<label>Email address</label>
|
||||||
<span class="gh-input-icon gh-icon-mail">
|
<span class="gh-input-icon gh-icon-mail">
|
||||||
|
Loading…
Reference in New Issue
Block a user