Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed read only mode feature #2005

Merged
merged 1 commit into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Copy link
Contributor

@murny murny Nov 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a complete 1 to 1 port of the code that's currently in master. Any reason why to leave out certain things (like setting system api key and setting system boolean to true, etc)?

https://github.com/ualbertalib/jupiter/blob/master/db/migrate/20200305210657_add_system_account_if_needed.rb

Is it just cause this branch is a bit behind and missing some of this code (system boolean/api key/etc)?

Also we will have some wrestling to do when we get production on master.

Do we have plans on merging this old-master-fedora branch back into Master in the future or just let it die? (if we merging it, then we will have two of these migrations doing similar things sitting around which is probably not ideal).

Finally when we do get production on Master, our system user could be missing the system boolean and api key generated for this from the old migration and we need to remember to add these things onto the system user

But you might have a plan for all this and if so ignore me 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those columns (system api key, and system boolean) don't exist on this branch. So this is kind of the minimal version of what happens over on master, that won't interfere with master, without having to back port a bunch of that API work just to create this account.

I don't really plan on porting this over to master? It just gets current production to a known state that master can then continue forward from without breaking, without having to do a bunch of backporting from master->old master and then old master -> master

Copy link
Contributor

@murny murny Nov 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍 .

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
2 changes: 1 addition & 1 deletion lib/jupiter/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Jupiter
VERSION = '1.2.24'.freeze
VERSION = '1.2.25'.freeze
end