diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cdd049c7..8776699d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and releases in Jupiter project adheres to [Semantic Versioning](http://semver.o ## [Unreleased] +## [1.2.25] – 2020-11-30 + +### Fixed +- Fixed read only mode feature by adding system account if needed [PR#2005](https://github.com/ualbertalib/jupiter/pull/2005) + ## [1.2.24] – 2020-10-13 ### Added diff --git a/db/migrate/20201130183659_add_system_account_if_needed.rb b/db/migrate/20201130183659_add_system_account_if_needed.rb new file mode 100644 index 000000000..ed5a5fb1b --- /dev/null +++ b/db/migrate/20201130183659_add_system_account_if_needed.rb @@ -0,0 +1,8 @@ +class AddSystemAccountIfNeeded < ActiveRecord::Migration[5.2] + def change + User.find_or_create_by(email: 'ditech@ualberta.ca') do |user| + user.name ||= 'System user' + user.admin = false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 718cd8f6b..cec7acace 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_08_31_182732) do +ActiveRecord::Schema.define(version: 2020_11_30_183659) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/lib/jupiter/version.rb b/lib/jupiter/version.rb index 0bf585eb3..df28aad0e 100644 --- a/lib/jupiter/version.rb +++ b/lib/jupiter/version.rb @@ -1,3 +1,3 @@ module Jupiter - VERSION = '1.2.24'.freeze + VERSION = '1.2.25'.freeze end