Template
forked from CEN-RA/Plugin_QGIS
message d'erreur pour les droits
This commit is contained in:
@@ -335,13 +335,14 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
item = QTableWidgetItem(table_name)
|
||||
self.tableWidget.setItem(i, 3, item)
|
||||
|
||||
if (str(value[0]) + '.' + str(value[1])) in GrandUser:
|
||||
pass
|
||||
else:
|
||||
# print(str(value[0]) + '.' + str(value[1]), 'bad')
|
||||
for j in range(self.tableWidget.columnCount()):
|
||||
self.tableWidget.item(i, j).setBackground(QtGui.QColor(187, 134, 192, 50))
|
||||
self.tableWidget.item(i, j).setToolTip('Droit insuffisant pour ouvrire la couche !')
|
||||
if dbtype == sigdb:
|
||||
if (str(value[0]) + '.' + str(value[1])) in GrandUser:
|
||||
pass
|
||||
else:
|
||||
# print(str(value[0]) + '.' + str(value[1]), 'bad')
|
||||
for j in range(self.tableWidget.columnCount()):
|
||||
self.tableWidget.item(i, j).setBackground(QtGui.QColor(187, 134, 192, 50))
|
||||
self.tableWidget.item(i, j).setToolTip('Droit insuffisant pour ouvrire la couche !')
|
||||
|
||||
i = i + 1
|
||||
|
||||
@@ -480,8 +481,12 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
RasterList.append(rasterFind[0])
|
||||
|
||||
for row in range(0, self.tableWidget_2.rowCount()):
|
||||
color_rgba = 855030089
|
||||
if self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba:
|
||||
color_rgba_db = 855030089
|
||||
color_rgba_droit = 851150528
|
||||
print(self.tableWidget_2.item(row, 1).background().color().rgba())
|
||||
if self.tableWidget_2.item(row, 1).background().color().rgba() == color_rgba_droit:
|
||||
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "Vous ne disposez pas des droit pour la couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» !", QMessageBox.StandardButton(0x00004000))
|
||||
elif self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba_db:
|
||||
# supression de la partie de l'url après le point d'interrogation
|
||||
if dbtype == sigdb:
|
||||
code = self.tableWidget_2.item(row, 1).text()
|
||||
|
||||
Reference in New Issue
Block a user