Skip to content

Commit 51d375d

Browse files
authored
Merge pull request #49 from AtlasSystems/feature/33341/ContainersOnly
Correctly handle requests_permitted_for_containers_only
2 parents f75a1dd + d8e4d0f commit 51d375d

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

Readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ArchivesSpace Request Fulfillment via Aeon
22

3-
**Version:** 20241210
3+
**Version:** 20250617
44

5-
**Last Updated:** December 10, 2024
5+
**Last Updated:** June 17, 2025
66

77

88
## Table of Contents
@@ -162,6 +162,8 @@ ArchivesSpace may cause changes in the functionality of this plugin.
162162
- Fixed a bug that caused a login loop when `:top_container_mode` is false.
163163
Rather than using action=11&type=200 in this case, the AeonForm is specified as
164164
ExternalRequest with a hidden input instead.
165+
- **20250617**
166+
- Fixed a bug that prevented the plugin from correctly handling the `:requests_permitted_for_containers_only` setting when `:top_container_mode` is false.
165167

166168
## Requirements
167169

public/models/aeon_record_mapper.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def unrequestable_display_message
9292
else
9393
return "Not requestable"
9494
end
95-
elsif !self.record_has_top_containers?
95+
elsif !self.record_has_top_containers? && (self.repo_settings[:requests_permitted_for_containers_only] == true || self.repo_settings[:top_container_mode] == true)
9696
if (message = self.repo_settings[:no_containers_message])
9797
return message
9898
else
@@ -117,14 +117,16 @@ def configured?
117117
def hide_button?
118118
# returning false to maintain the original behavior
119119
return false unless self.repo_settings
120-
120+
121121
if self.repo_settings[:hide_request_button]
122122
return true
123123
elsif (self.repo_settings[:hide_button_for_accessions] == true && record.is_a?(Accession))
124124
return true
125125
elsif self.requestable_based_on_archival_record_level? == false
126126
return true
127-
elsif self.record_has_top_containers? == false
127+
elsif self.repo_settings[:top_container_mode] == true && self.record_has_top_containers? == false
128+
return true
129+
elsif self.repo_settings[:requests_permitted_for_containers_only] == true && self.record_has_top_containers? == false
128130
return true
129131
elsif self.record_has_restrictions? == true
130132
return true

0 commit comments

Comments
 (0)