Cleaned up auditLog flag

refs https://github.com/TryGhost/Toolbox/issues/356

- this is now longer needed now Audit log/History is GA
This commit is contained in:
Daniel Lockyer 2022-09-12 14:37:07 +01:00
parent 70ae355ba6
commit 067bfe92a4
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD
7 changed files with 10 additions and 96 deletions

View File

@ -1,16 +1,6 @@
import AdminRoute from 'ghost-admin/routes/admin';
import {inject as service} from '@ember/service';
export default class HistoryRoute extends AdminRoute {
@service feature;
beforeModel() {
super.beforeModel(...arguments);
if (!this.feature.auditLog) {
return this.transitionTo('home');
}
}
buildRouteInfoMetadata() {
return {
titleToken: 'History log'

View File

@ -56,7 +56,6 @@ export default class FeatureService extends Service {
nightShift;
// labs flags
@feature('auditLog') auditLog;
@feature('urlCache') urlCache;
@feature('beforeAfterCard') beforeAfterCard;
@feature('newsletterPaywall') newsletterPaywall;

View File

@ -3,7 +3,6 @@
<h2 class="gh-canvas-title" data-test-screen-title>
Settings
</h2>
{{#if (feature 'auditLog')}}
<section class="view-actions">
{{#if this.upgradeStatus.message}}
<button type="button" class="gh-btn gh-btn-with-notification" {{on "click" (fn this.openAbout null)}} data-tooltip="Update available!">
@ -16,7 +15,6 @@
</button>
{{/if}}
</section>
{{/if}}
</GhCanvasHeader>
<section class="view-container">
@ -90,22 +88,20 @@
</LinkTo>
<LinkTo class="gh-setting-group" @route="settings.labs" data-test-nav="labs">
<span class="{{if (feature 'auditLog') "blue" "pink"}}">{{svg-jar "labs"}}</span>
<span class="blue">{{svg-jar "labs"}}</span>
<div>
<h4>Labs</h4>
<p>Testing ground for new features</p>
</div>
</LinkTo>
{{#if (feature 'auditLog')}}
<LinkTo class="gh-setting-group" @route="settings.history" data-test-nav="history">
<span class="pink">{{svg-jar "calendar-stroke"}}</span>
<div>
<h4>History</h4>
<p>View system event log</p>
</div>
</LinkTo>
{{/if}}
<LinkTo class="gh-setting-group" @route="settings.history" data-test-nav="history">
<span class="pink">{{svg-jar "calendar-stroke"}}</span>
<div>
<h4>History</h4>
<p>View system event log</p>
</div>
</LinkTo>
</div>
</section>
</section>

View File

@ -187,19 +187,6 @@
<div class="gh-main-section">
<h4 class="gh-main-section-header small bn">Alpha Features</h4>
<div class="gh-expandable">
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">History Log</h4>
<p class="gh-expandable-description">
Allow visibility into Staff actions
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="auditLog" />
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>

View File

@ -20,7 +20,7 @@
{{/if}}
<section class="view-actions">
{{#if (or this.userActionsAreVisible (and (feature 'auditLog') this.session.user.isAdmin))}}
{{#if (or this.userActionsAreVisible this.session.user.isAdmin)}}
<span class="dropdown">
<GhDropdownButton @dropdownName="user-actions-menu" @classNames="gh-btn gh-btn-white gh-btn-icon icon-only user-actions-cog" @title="User Actions" data-test-user-actions={{true}}>
<span>
@ -64,13 +64,11 @@
{{/if}}
{{/if}}
{{#if (feature 'auditLog')}}
<li>
<LinkTo @route="settings.history" @query={{hash user=this.user.id}}>
<span>View user activity</span>
</LinkTo>
</li>
{{/if}}
</GhDropdown>
</span>
{{/if}}

View File

@ -1,13 +1,6 @@
<section class="gh-canvas js-settings-content {{if (feature 'auditLog') "gh-whats-new-canvas"}}" {{scroll-top}}>
<section class="gh-canvas js-settings-content gh-whats-new-canvas" {{scroll-top}}>
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-whats-new-heading">{{svg-jar "gift"}} What's new?</h2>
{{#if (not (feature 'auditLog'))}}
<div class="gh-about-header-actions">
<a class="gh-btn gh-btn-outline" href="https://ghost.org/docs/" target="_blank" rel="noopener noreferrer"><span>User documentation</span></a>
<a class="gh-btn gh-btn-outline" href="https://forum.ghost.org/" target="_blank" rel="noopener noreferrer"><span>Get help with Ghost</span></a>
<a class="gh-btn gh-btn-black" href="https://ghost.org/docs/contributing/" target="_blank" rel="noopener noreferrer"><span>Get involved</span></a>
</div>
{{/if}}
</GhCanvasHeader>
<section class="view-container">
<div class="gh-about-container">
@ -33,54 +26,6 @@
{{/each}}
<a class="green" href="https://ghost.org/changelog" target="_blank" rel="noopener noreferrer">See all updates &rarr;</a>
</section>
{{#if (not (feature 'auditLog'))}}
<div class="gh-about-content-actions">
<a class="gh-btn gh-btn-outline" href="https://ghost.org/docs/" target="_blank" rel="noopener noreferrer"><span>User documentation</span></a>
<a class="gh-btn gh-btn-outline" href="https://forum.ghost.org/" target="_blank" rel="noopener noreferrer"><span>Get help with Ghost</span></a>
<a class="gh-btn gh-btn-black" href="https://ghost.org/docs/contributing/" target="_blank" rel="noopener noreferrer"><span>Get involved</span></a>
</div>
<section class="gh-env-details gh-about-box grey">
<div class="gh-about-logo">
{{svg-jar "ghost-logo-orb" alt="Ghost"}}
</div>
{{#if this.upgradeStatus.message}}
<section class="gh-upgrade-notification">
<p>
<strong>Update available!</strong> {{this.upgradeStatus.message}}
</p>
</section>
{{/if}}
<ul class="gh-env-list">
{{#if this.linkToGitHubReleases}}
<li><strong>Version:</strong> <a href="https://github.com/TryGhost/Ghost/releases/tag/v{{this.config.version}}" target="_blank" rel="noopener noreferrer">{{this.config.version}}</a></li>
{{else}}
<li><strong>Version:</strong> {{this.config.version}}</li>
{{/if}}
{{#if this.showSystemInfo}}
<li><strong>Environment:</strong> <span class="ttc">{{this.config.environment}}</span></li>
<li class="gh-env-list-database-type"><strong>Database:</strong> {{this.config.database}}</li>
<li><strong>Mail:</strong> {{#if this.config.mail}}{{this.config.mail}}{{else}}Native{{/if}}</li>
{{/if}}
{{#if (enable-developer-experiments)}}
<li><strong>Developer experiments:</strong> <span class="gh-badge">Enabled</span></li>
{{/if}}
</ul>
{{#if (and this.showSystemInfo this.showDatabaseWarning)}}
<div class="gh-env-error">
You are running an unsupported database in production. Please <a href="https://ghost.org/docs/faq/supported-databases/" target="_blank" rel="noopener noreferrer">upgrade to MySQL 8</a>.
</div>
{{/if}}
<footer class="gh-copyright-info">
Copyright &copy; 2013 &ndash; {{this.copyrightYear}} Ghost Foundation, released under the <a href="https://github.com/TryGhost/Ghost/blob/master/LICENSE" target="_blank" rel="noopener noreferrer">MIT license</a>. <a href="https://ghost.org/" target="_blank" rel="noopener noreferrer">Ghost</a> is a registered trademark of <a href="https://ghost.org/trademark/" target="_blank" rel="noopener noreferrer">Ghost Foundation Ltd</a>.
</footer>
</section>
{{/if}}
</div>
</section>
</section>

View File

@ -15,7 +15,6 @@ const messages = {
// flags in this list always return `true`, allows quick global enable prior to full flag removal
const GA_FEATURES = [
'auditLog',
'newsletterPaywall',
'freeTrial',
'compExpiring',