Mise à jour de sécurité

This commit is contained in:
2025-04-03 12:45:32 +02:00
parent f692414698
commit dbe918cfcf
32 changed files with 302 additions and 437 deletions
+11 -1
View File
@@ -12,13 +12,15 @@ import qgis
#include <QSettings>
import socket
import os
from .tools.resources import (
plugin_path,
pyperclip,
resources_path,
maj_verif,
)
pyperclip()
from .copie_editor import Copie_Editor
from .about_form import AboutDialog
@@ -66,6 +68,14 @@ class PgCopie:
self.copie_editor = QAction(icon, 'Copie',None)
self.toolBar.addAction(self.copie_editor)
self.copie_editor.triggered.connect(self.open_editor)
self.copie_editor.setEnabled(False)
IPAddr=socket.gethostbyname(socket.gethostname())
if IPAddr[0:11] == "100.100.100":
self.copie_editor.setEnabled(True)
elif IPAddr[0:9] == "192.168.0":
self.copie_editor.setEnabled(True)
elif IPAddr[0:9] == "192.168.1":
self.copie_editor.setEnabled(True)
def open_about_dialog(self):
"""