Skip to content

Commit cd72d69

Browse files
authored
Merge pull request #304 from usnistgov/7.3.1.dev
7.3.1.dev
2 parents ef3ee9d + 563ae54 commit cd72d69

File tree

10 files changed

+28
-8
lines changed

10 files changed

+28
-8
lines changed

Dockerfile.splash_pad

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM python:3.13
22

3+
ENV PIP_ROOT_USER_ACTION=ignore
4+
35
RUN apt-get update && apt-get upgrade -y && apt-get install -y systemctl rsync vim less
46

57
COPY . /nemo/

NEMO/apps/kiosk/templates/kiosk/tool_report_problem.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h4>{{ message }}</h4>
9090
<span style="padding-left:10px;">This problem represents a safety hazard to the {{ facility_name }} and should be regarded as urgent.Notify the {{ facility_name }} safety officer of this issue.</span>
9191
</label>
9292
</div>
93-
{% if tool.problem_shutdown_enabled %}
93+
{% if tool.problem_shutdown_enabled or customer|is_staff_on_tool:tool %}
9494
<div class="checkbox">
9595
<label>
9696
<input name="force_shutdown"

NEMO/context_processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def base_context(request):
9191
"access_user_request_allowed_exist": access_user_request_allowed_exist,
9292
"adjustment_request_allowed": adjustment_request_allowed == "enabled"
9393
or adjustment_request_allowed == "reviewers_only"
94-
and user
94+
and isinstance(user, User)
9595
and user.is_adjustment_request_reviewer,
9696
"staff_assistance_request_allowed": customization_values.get("staff_assistance_requests_enabled", "")
9797
== "enabled",

NEMO/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
UserPreferences,
5050
)
5151
from NEMO.policy import policy_class as policy
52+
from NEMO.templatetags.custom_tags_and_filters import is_staff_on_tool
5253
from NEMO.utilities import (
5354
RecurrenceFrequency,
5455
bootstrap_primary_color,
@@ -178,7 +179,7 @@ def clean(self):
178179
"This task can't be resolved because it is marked as 'cancelled' or 'resolved' already."
179180
)
180181
tool = cleaned_data.get("tool")
181-
if tool and not tool.problem_shutdown_enabled:
182+
if tool and not tool.problem_shutdown_enabled and not is_staff_on_tool(self.user, tool):
182183
cleaned_data["force_shutdown"] = False
183184
return cleaned_data
184185

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Django 4.2.27 on 2026-01-07 23:45
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("NEMO", "0136_tool__requires_area_occupancy_minimum"),
10+
]
11+
12+
operations = [
13+
migrations.AddIndex(
14+
model_name="area",
15+
index=models.Index(fields=["tree_id", "lft"], name="NEMO_area_tree_id_lft_idx"),
16+
),
17+
]

NEMO/templates/maintenance/pending_task_details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ <h2>{{ task.tool.name }} task</h2>
121121
</div>
122122
<div class="form-group">
123123
<div class="col-lg-12">
124-
{% if task.tool.problem_shutdown_enabled %}
124+
{% if task.tool.problem_shutdown_enabled or user|is_staff_on_tool:task.tool %}
125125
<div class="checkbox">
126126
<label>
127127
<input type="checkbox" name="force_shutdown" {% if task.force_shutdown %}checked{% endif %}>

NEMO/templates/tasks/resolve.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h4>Resolve the task</h4>
2323
<input type="hidden"
2424
name="estimated_resolution_time"
2525
value="{{ estimated_resolution_time|input_date_format }}">
26-
{% if task.tool.problem_shutdown_enabled %}
26+
{% if task.tool.problem_shutdown_enabled or user|is_staff_on_tool:task.tool %}
2727
<input type="hidden" name="force_shutdown" value="{{ task.force_shutdown }}">
2828
{% endif %}
2929
<input type="hidden" name="safety_hazard" value="{{ task.safety_hazard }}">

NEMO/templates/tasks/update.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h4>Update the task</h4>
7878
</script>
7979
</div>
8080
<div class="form-group">
81-
{% if task.tool.problem_shutdown_enabled %}
81+
{% if task.tool.problem_shutdown_enabled or user|is_staff_on_tool:task.tool %}
8282
<div class="checkbox">
8383
<label>
8484
<input type="checkbox" name="force_shutdown" {% if task.force_shutdown %}checked{% endif %}>

NEMO/templates/tool_control/tool_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ <h4 class="media-heading">Tool properties</h4>
10501050
This problem represents a <b>safety hazard</b> to the {{ facility_name }} and should be regarded as urgent. Notify the {{ facility_name }} safety officer of this issue.
10511051
</label>
10521052
</div>
1053-
{% if tool.problem_shutdown_enabled %}
1053+
{% if tool.problem_shutdown_enabled or user|is_staff_on_tool:tool %}
10541054
<div class="checkbox">
10551055
<label>
10561056
<input name="force_shutdown" id="force_shutdown" type="checkbox" />

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "NEMO"
3-
version = "7.3.0"
3+
version = "7.3.1"
44
description = "NEMO is a laboratory logistics web application. Use it to schedule reservations, control tool access, track maintenance issues, and more."
55
keywords = ["NEMO"]
66
readme = "README.md"

0 commit comments

Comments
 (0)