[QGIS-Developer] PyQgis: custom form and enable (trusted) macro
enrico chiaradia
enrico.chiaradia at yahoo.it
Thu Nov 12 05:40:11 PST 2020
Dear Devs,
Iâm working to a new plugin for qgis 3.10 that use macro to customize
attribute forms behaviour (e.g. openForm, etcâ¦). For security reason,
macros are not enabled by default in QGIS and so, each time you open the
attribute table/form view, it asks to enable macro. That sounds boring
for the final userâ¦
I can manually resolve this modifying the option âenable macrosâ to âFor
this session onlyâ or, by PyQgis, editing the QgsSettings, key
âqgis/enableMacrosâ to âSessionOnlyâ and restore old configuration
options after plugin unloads.
The problem is that, during the sessions, all the macros are enabled
showing a security issue. Is there a way to run only trusted macros, for
example stored under my plugin folder?
Many thanks
enrico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201112/8d1a5e4b/attachment-0001.html>
More information about the QGIS-Developer
mailing list