0cb24b4759
access.xml: 12 component-specific actions added: - mokosuitecross.crosspost (auto cross-post on publish) - mokosuitecross.crosspost.manual (manually create posts) - mokosuitecross.delete.remote (delete from remote platforms) - mokosuitecross.services.manage (create/edit/delete services) - mokosuitecross.services.credentials (view decrypted credentials) - mokosuitecross.templates.manage (create/edit/delete templates) - mokosuitecross.logs.view (view activity logs) - mokosuitecross.logs.purge (purge old logs) - mokosuitecross.queue.manage (manage post queue) - mokosuitecross.queue.export (export posts as CSV) - mokosuitecross.dispatch (trigger REST API dispatch) - mokosuitecross.migrate (run Perfect Publisher migration) config.xml: permissions fieldset with rules field for admin UI. Enforcement: - DisplayController: core.manage gate on all views - ServicesController: publish/delete ACL checks - TemplatesController: publish/delete ACL checks - PostsController: queue.export permission - ServiceController: services.manage for test connection - DispatchController: dispatch permission for REST API - All list views: preferences button gated by core.admin - All edit views: save/apply buttons gated by section permission - MokoSuiteCrossHelper::getActions() centralizes ACL lookups
37 lines
1003 B
PHP
37 lines
1003 B
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoSuiteCross
|
|
* @subpackage com_mokosuitecross
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
namespace Joomla\Component\MokoSuiteCross\Administrator\Controller;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\MVC\Controller\BaseController;
|
|
|
|
class DisplayController extends BaseController
|
|
{
|
|
/**
|
|
* The default view.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $default_view = 'dashboard';
|
|
|
|
public function display($cachable = false, $urlparams = [])
|
|
{
|
|
if (!$this->app->getIdentity()->authorise('core.manage', 'com_mokosuitecross')) {
|
|
throw new \Joomla\CMS\Access\Exception\NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
|
|
}
|
|
|
|
return parent::display($cachable, $urlparams);
|
|
}
|
|
}
|