Skip to content

Commit

Permalink
Fixed read only mode feature by adding system account if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorSheremeta committed Nov 30, 2020
1 parent a7982cd commit ed35f67
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and releases in Jupiter project adheres to [Semantic Versioning](http://semver.o

## [Unreleased]

### Fixed
- Fixed read only mode feature by adding system account if needed

## [1.2.24] – 2020-10-13

### Added
Expand Down
8 changes: 8 additions & 0 deletions db/migrate/20201130183659_add_system_account_if_needed.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ed35f67

Please sign in to comment.