mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Protected Audit Log page behind labs flag
refs https://github.com/TryGhost/Toolbox/issues/356 - even though I was hiding the button, it's better to prevent going to the route entirely by redirecting to the homepage if the labs flag is not enabled
This commit is contained in:
parent
7b160493db
commit
7ce6b27772
@ -1,6 +1,16 @@
|
||||
import AdminRoute from 'ghost-admin/routes/admin';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class AuditLogRoute extends AdminRoute {
|
||||
@service feature;
|
||||
|
||||
beforeModel() {
|
||||
super.beforeModel(...arguments);
|
||||
if (!this.feature.auditLog) {
|
||||
return this.transitionTo('home');
|
||||
}
|
||||
}
|
||||
|
||||
buildRouteInfoMetadata() {
|
||||
return {
|
||||
titleToken: 'Settings - Audit log'
|
||||
|
Loading…
Reference in New Issue
Block a user