mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Enabled members by default
no-issue This removes the need for `enableDeveloperExperiments` flag for members
This commit is contained in:
parent
49b28e4493
commit
6b1cd8dc23
@ -5,16 +5,11 @@ export default AuthenticatedRoute.extend({
|
||||
config: service(),
|
||||
|
||||
// redirect to posts screen if:
|
||||
// - developer experiments aren't enabled
|
||||
// - TODO: members is disabled?
|
||||
// - logged in user isn't owner/admin
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (!this.config.get('enableDeveloperExperiments')) {
|
||||
return this.transitionTo('home');
|
||||
}
|
||||
|
||||
return this.session.user.then((user) => {
|
||||
if (!user.isOwnerOrAdmin) {
|
||||
return this.transitionTo('home');
|
||||
|
@ -201,7 +201,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{{#if session.user.isOwner}}
|
||||
{{#if config.enableDeveloperExperiments}}
|
||||
<div class="gh-setting-header">Members (BETA) </div>
|
||||
<div class="flex flex-column br3 shadow-1 bg-grouped-table mt2">
|
||||
<div class="gh-setting-first gh-setting-last">
|
||||
@ -237,7 +236,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -32,8 +32,6 @@ describe('Acceptance: Members', function () {
|
||||
describe('as admin', function () {
|
||||
beforeEach(async function () {
|
||||
this.server.loadFixtures('configs');
|
||||
let config = this.server.schema.configs.first();
|
||||
config.update({enableDeveloperExperiments: true});
|
||||
|
||||
let role = this.server.create('role', {name: 'Administrator'});
|
||||
this.server.create('user', {roles: [role]});
|
||||
@ -41,17 +39,6 @@ describe('Acceptance: Members', function () {
|
||||
return await authenticateSession();
|
||||
});
|
||||
|
||||
it('redirects to home if developer experiments is disabled', async function () {
|
||||
let config = this.server.schema.configs.first();
|
||||
config.update({enableDeveloperExperiments: false});
|
||||
|
||||
await visit('/members');
|
||||
|
||||
expect(currentURL()).to.equal('/site');
|
||||
expect(find('[data-test-nav="members"]'), 'sidebar link')
|
||||
.to.not.exist;
|
||||
});
|
||||
|
||||
it('shows sidebar link which navigates to members list', async function () {
|
||||
await visit('/settings/labs');
|
||||
await click('#labs-members');
|
||||
|
Loading…
Reference in New Issue
Block a user