forked from enviPath/enviPy
Compare commits
5 Commits
e09e1fe048
...
7653561833
| Author | SHA1 | Date | |
|---|---|---|---|
| 7653561833 | |||
| 1088586d9f | |||
| bbf4c54c12 | |||
| 448edb3d40 | |||
| c0c0e969dc |
@ -5,11 +5,11 @@
|
||||
class="modal"
|
||||
x-data="{
|
||||
isSubmitting: false,
|
||||
packageClassification: null,
|
||||
packageClassification: '',
|
||||
|
||||
reset() {
|
||||
this.isSubmitting = false;
|
||||
this.packageClassification = null;
|
||||
this.packageClassification = '';
|
||||
},
|
||||
|
||||
setFormData(data) {
|
||||
@ -114,7 +114,7 @@
|
||||
x-model="packageClassification"
|
||||
required
|
||||
>
|
||||
<option value="null" disabled selected>Select Classification</option>
|
||||
<option value="" disabled>Select Classification</option>
|
||||
<option value="0">Internal</option>
|
||||
<option value="10">Restricted</option>
|
||||
<option value="20">Secret</option>
|
||||
|
||||
@ -56,7 +56,7 @@ def get_pathway_for_iuclid_export(user, pathway_uuid: UUID) -> PathwayExportDTO:
|
||||
|
||||
ai_for_node = []
|
||||
scenario_entries: list[PathwayScenarioDTO] = []
|
||||
for scenario in sorted(node.scenarios.all(), key=lambda item: item.pk):
|
||||
for scenario in sorted(node.get_scenarios(), key=lambda item: item.pk):
|
||||
ai_for_scenario = list(scenario.get_additional_information(direct_only=True))
|
||||
ai_for_node.extend(ai_for_scenario)
|
||||
scenario_entries.append(
|
||||
|
||||
@ -141,9 +141,9 @@ def entra_callback(request):
|
||||
if group.user_member.contains(u):
|
||||
# User is eligible for secrete
|
||||
pack = u.default_package
|
||||
u.data_pool = group
|
||||
u.classification_level = u.Classification.SECRET
|
||||
u.save()
|
||||
pack.data_pool = group
|
||||
pack.classification_level = pack.Classification.SECRET
|
||||
pack.save()
|
||||
|
||||
# EDIT END
|
||||
|
||||
|
||||
@ -317,19 +317,19 @@ class GroupManager(object):
|
||||
if isinstance(member, Group):
|
||||
if add_or_remove == "add":
|
||||
group.group_member.add(member)
|
||||
auth_log.info(f"{caller.username} ({caller.url}) adds {member.name} ({member.url}) to {group.name} ({group.url})")
|
||||
auth_log.info(f"{caller.username} ({caller.url}) adds {member.name} ({member.url}) to {group.name} ({group.url})")
|
||||
else:
|
||||
group.group_member.remove(member)
|
||||
auth_log.info(
|
||||
f"{caller.username} ({caller.url}) removes {member.name} ({member.url}) to {group.name} ({group.url})")
|
||||
f"{caller.username} ({caller.url}) removes {member.name} ({member.url}) from {group.name} ({group.url})")
|
||||
else:
|
||||
if add_or_remove == "add":
|
||||
group.user_member.add(member)
|
||||
auth_log.info(f"{caller.username} ({caller.url}) adds {member.username} ({member.url}) to {group.name} ({group.url})")
|
||||
auth_log.info(f"{caller.username} ({caller.url}) adds {member.username} ({member.url}) to {group.name} ({group.url})")
|
||||
else:
|
||||
group.user_member.remove(member)
|
||||
auth_log.info(
|
||||
f"{caller.username} ({caller.url}) adds {member.username} ({member.url}) to {group.name} ({group.url})")
|
||||
f"{caller.username} ({caller.url}) removes {member.username} ({member.url}) from {group.name} ({group.url})")
|
||||
|
||||
group.save()
|
||||
|
||||
|
||||
@ -351,7 +351,8 @@ class PathwayMapper:
|
||||
|
||||
props = SoilPropertiesData()
|
||||
|
||||
for ai in ai_list:
|
||||
for ai_obj in ai_list:
|
||||
ai = ai_obj.get()
|
||||
if isinstance(ai, SoilTexture1) and props.soil_type is None:
|
||||
props.soil_type = ai.type.value
|
||||
elif isinstance(ai, SoilTexture2):
|
||||
|
||||
@ -108,8 +108,7 @@
|
||||
{% elif not meta.url_contains_package and meta.user.default_package.get_classification_level_display == "Restricted" %}
|
||||
<img src="{% static 'images/restricted_mid.png' %}" width="200">
|
||||
{% elif not meta.url_contains_package and meta.user.default_package.get_classification_level_display == "Secret" %}
|
||||
<img src="{% static 'images/secret_mid.png' %}" width="200">
|
||||
|
||||
<img src="{% static 'images/secret_mid.png' %}" width="120">
|
||||
{% endif %}
|
||||
{% if not public_mode %}
|
||||
<a id="search-trigger" role="button" class="cursor-pointer">
|
||||
|
||||
Reference in New Issue
Block a user