Skip to content

Commit

Permalink
Merge pull request #1034 from psu-libraries/825-set-OAB-flags
Browse files Browse the repository at this point in the history
set permissions flags after OAB check
  • Loading branch information
Smullz622 authored Dec 5, 2024
2 parents ddd6156 + 29d273b commit a850832
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/jobs/file_permissions_check_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def perform(file_id)
file.license = permissions.licence
file.set_statement = permissions.set_statement
file.embargo_date = permissions.embargo_end_date
file.checked_for_set_statement = true
file.checked_for_embargo_date = true
file.save!
end
end
4 changes: 4 additions & 0 deletions spec/component/jobs/file_permissions_check_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
'and is subject to Springer Nature’s AM terms of use, but is not the Version of Record and does not reflect post-acceptance improvements, or any corrections. The Version of Record is available online at: http://dx.doi.org/10.1038/s41598-023-28289-6'
)
expect(f.embargo_date).to eq Date.new(2024, 1, 24)
expect(f.checked_for_set_statement).to be true
expect(f.checked_for_embargo_date).to be true
end
end

Expand All @@ -58,6 +60,8 @@
expect(f.license).to eq 'https://creativecommons.org/licenses/by/4.0/'
expect(f.set_statement).to eq 'This is a published article.'
expect(f.embargo_date).to eq Date.new(2022, 1, 24)
expect(f.checked_for_set_statement).to be true
expect(f.checked_for_embargo_date).to be true
end
end
end
Expand Down

0 comments on commit a850832

Please sign in to comment.