fix admin privilege
This commit is contained in:
parent
a60fc17fe1
commit
e833030b09
|
|
@ -305,6 +305,13 @@ class Test(Widget):
|
|||
self.user_l.setText("ADMIN")
|
||||
self.user_l.setStyleSheet("QLabel { color: red; }")
|
||||
|
||||
#Refresh Recipe_Selection UI to show admin buttons
|
||||
if "select_recipe" in self.cycle_available_steps and self.cycle_available_steps["select_recipe"].widget:
|
||||
recipe_selection = self.cycle_available_steps["select_recipe"].widget
|
||||
if hasattr(recipe_selection, "refresh"):
|
||||
recipe_selection.refresh()
|
||||
self.log.info("Recipe Selection UI refreshed to show admin buttons")
|
||||
|
||||
self.log.info(f"Temporary admin privileges enabled for user: {session.username}")
|
||||
return True
|
||||
|
||||
|
|
@ -331,6 +338,13 @@ class Test(Widget):
|
|||
else:
|
||||
self.user_l.setStyleSheet("")
|
||||
|
||||
# Refresh Recipe_Selection UI to hide admin buttons
|
||||
if "select_recipe" in self.cycle_available_steps and self.cycle_available_steps["select_recipe"].widget:
|
||||
recipe_selection = self.cycle_available_steps["select_recipe"].widget
|
||||
if hasattr(recipe_selection, "refresh"):
|
||||
recipe_selection.refresh()
|
||||
self.log.info("Recipe Selection UI refreshed to hide admin buttons")
|
||||
|
||||
self.log.info(f"Temporary admin privileges disabled for user: {session.username}")
|
||||
return True
|
||||
|
||||
|
|
|
|||
|
|
@ -2266,26 +2266,8 @@ border: 1px solid black;
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="7">
|
||||
<widget class="QLabel" name="valore_PID_l">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);
|
||||
border: 1px solid black;
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="4" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="valore_PID">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user