Skip to content

Commit

Permalink
Service_user is no longer an attribute of user.
Browse files Browse the repository at this point in the history
  • Loading branch information
amanning9 committed May 3, 2023
1 parent 526db1f commit d683263
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jasmin_services/models/behaviours/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Meta:

def apply(self, user, _role):
# Don't join service users up to the mailing list
if user.service_user:
if user.user_type in ["SERVICE", "SHARED", "TRAINING"]:
return
# If the user is already in joined_users, there is nothing to do
if self.joined_users.filter(pk=user.pk).exists():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content %}
Hi {{ user.first_name }},
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
The following access has been granted:

Service: {{ target.access.role.service }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following access has expired:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following access will expire soon:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following access has been revoked:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following request has been submitted for approval:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following request requires additional information:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Hi {{ user.first_name }},

The following request has been rejected:
{% if target.access.user.service_user %}
{% if target.access.user.user_type == "SERVICE" %}
Service: {{ target.access.role.service }}
Role: {{ target.access.role.name }}
User: {{ target.access.user }}
Expand Down

0 comments on commit d683263

Please sign in to comment.