mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05: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 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue