Skip to content

Commit

Permalink
Fix ability to view Manager Actions (#16473)
Browse files Browse the repository at this point in the history
* Update logs controller

Update permissions key to new 3.x mgr_log_view key

* Code formatting update
  • Loading branch information
smg6511 authored Oct 3, 2023
1 parent 6a2e0b1 commit eae6e62
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions manager/controllers/default/system/logs/index.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of MODX Revolution.
*
Expand All @@ -16,22 +17,25 @@
* @package modx
* @subpackage manager.controllers
*/
class SystemLogsManagerController extends modManagerController {
class SystemLogsManagerController extends modManagerController
{
/**
* Check for any permissions or requirements to load page
* @return bool
*/
public function checkPermissions() {
return $this->modx->hasPermission('logs');
public function checkPermissions()
{
return $this->modx->hasPermission('mgr_log_view');
}

/**
* Register custom CSS/JS for the page
* @return void
*/
public function loadCustomCssJs() {
$this->addJavascript($this->modx->getOption('manager_url').'assets/modext/widgets/system/modx.grid.manager.log.js');
$this->addJavascript($this->modx->getOption('manager_url').'assets/modext/sections/system/logs.js');
public function loadCustomCssJs()
{
$this->addJavascript($this->modx->getOption('manager_url') . 'assets/modext/widgets/system/modx.grid.manager.log.js');
$this->addJavascript($this->modx->getOption('manager_url') . 'assets/modext/sections/system/logs.js');
$this->addHtml("<script>
Ext.onReady(function() {
MODx.add('modx-page-manager-log');
Expand All @@ -43,30 +47,35 @@ public function loadCustomCssJs() {
* @param array $scriptProperties
* @return mixed
*/
public function process(array $scriptProperties = []) {}
public function process(array $scriptProperties = [])
{
}

/**
* Return the pagetitle
*
* @return string
*/
public function getPageTitle() {
public function getPageTitle()
{
return $this->modx->lexicon('manager_log');
}

/**
* Return the location of the template file
* @return string
*/
public function getTemplateFile() {
public function getTemplateFile()
{
return '';
}

/**
* Specify the language topics to load
* @return array
*/
public function getLanguageTopics() {
public function getLanguageTopics()
{
return ['manager_log'];
}
}

0 comments on commit eae6e62

Please sign in to comment.