File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
33 * This file is part of FacturaScripts
4- * Copyright (C) 2021-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
4+ * Copyright (C) 2021-2026 Carlos Garcia Gomez <carlos@facturascripts.com>
55 *
66 * This program is free software: you can redistribute it and/or modify
77 * it under the terms of the GNU Lesser General Public License as
2828use FacturaScripts \Core \Lib \ExtendedController \PanelController ;
2929use FacturaScripts \Core \Model \Base \BusinessDocumentLine ;
3030use FacturaScripts \Core \Model \Base \PurchaseDocument ;
31- use FacturaScripts \Core \Model \LogMessage ;
3231use FacturaScripts \Core \Tools ;
3332use FacturaScripts \Dinamic \Lib \AssetManager ;
3433use FacturaScripts \Dinamic \Model \Proveedor ;
@@ -239,6 +238,11 @@ protected function execPreviousAction($action)
239238
240239 protected function exportAction ()
241240 {
241+ if (false === $ this ->permissions ->allowExport ) {
242+ Tools::log ()->warning ('no-print-permission ' );
243+ return ;
244+ }
245+
242246 $ this ->setTemplate (false );
243247
244248 $ subjectLang = $ this ->views [static ::MAIN_VIEW_NAME ]->model ->getSubject ()->langcode ;
Original file line number Diff line number Diff line change 11<?php
22/**
33 * This file is part of FacturaScripts
4- * Copyright (C) 2021-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
4+ * Copyright (C) 2021-2026 Carlos Garcia Gomez <carlos@facturascripts.com>
55 *
66 * This program is free software: you can redistribute it and/or modify
77 * it under the terms of the GNU Lesser General Public License as
2828use FacturaScripts \Core \Lib \ExtendedController \PanelController ;
2929use FacturaScripts \Core \Model \Base \SalesDocument ;
3030use FacturaScripts \Core \Model \Base \SalesDocumentLine ;
31- use FacturaScripts \Core \Model \LogMessage ;
3231use FacturaScripts \Core \Tools ;
3332use FacturaScripts \Dinamic \Lib \AssetManager ;
3433use FacturaScripts \Dinamic \Model \Cliente ;
@@ -240,6 +239,11 @@ protected function execPreviousAction($action)
240239
241240 protected function exportAction ()
242241 {
242+ if (false === $ this ->permissions ->allowExport ) {
243+ Tools::log ()->warning ('no-print-permission ' );
244+ return ;
245+ }
246+
243247 $ this ->setTemplate (false );
244248
245249 $ subjectLang = $ this ->views [static ::MAIN_VIEW_NAME ]->model ->getSubject ()->langcode ;
You can’t perform that action at this time.
0 commit comments