-
Notifications
You must be signed in to change notification settings - Fork 1
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
Merge integration
into deployment-portage
For Upcoming Release
#948
Commits on Sep 23, 2024
-
Merge pull request #913 from portagenetwork/deployment-portage
Merge `deployment-portage` Code Changes Into `integration`
Configuration menu - View commit details
-
Copy full SHA for ed53842 - Browse repository at this point
Copy the full SHA ed53842View commit details
Commits on Sep 25, 2024
-
Disable email in forms & remove from update_params
- For the edited .erb files, `"disabled": true` has been set for the email fields section of forms (copies approach used in `app/views/org_admin/users/edit.html.erb`) - For added security, we are also removing `:email` from the .permit() update params of the corresponding controllers - Notes regarding changes to app/controllers/registrations_controller.rb: - Because `:email` was removed from the .permit() params, all of the `update_params[:email]`-related code needed to be addressed/removed (lines 161, 174, and 200) - The removal of `:email` from the update params allows for the removal of a lot of other code in the file. - The `if require_password` check in the `do_update` method is no longer needed. The comment on 197 stated `# user is changing email or password`. However, line 204-206 pointed out how this case is never actually reached for password changes (`def do_update_password` is executed instead). Since we are no longer allowing for the email to be changed either, it follows that `require_password` should always evaluate to false. - As result, we only need the code that corresponded to the `else` statement for `if require_password` (previously lines 225-228, now 185-188) - Also, because `require_password` is now always false, it follows that we can remove both the `require_password` arg from `def do_update` as well as the entirety of `def needs_password?`
Configuration menu - View commit details
-
Copy full SHA for 9ded631 - Browse repository at this point
Copy the full SHA 9ded631View commit details -
Update layout of "Edit Profile" contents
These layout changes are being made to align with the changes in commit 74c960896 (i.e. setting `"disabled": true` to user.email in "Edit Profile")
Configuration menu - View commit details
-
Copy full SHA for 2486220 - Browse repository at this point
Copy the full SHA 2486220View commit details -
Fix test / update SSO button name within test
The name of this button must match what is specified within `app/views/shared/_sign_in_form.html.erb`.
Configuration menu - View commit details
-
Copy full SHA for c445c1f - Browse repository at this point
Copy the full SHA c445c1fView commit details
Commits on Oct 3, 2024
-
Merge pull request #918 from portagenetwork/aaron/fix-button-name-for…
…-sso-test Fix Test / Update SSO button Name Within Test
Configuration menu - View commit details
-
Copy full SHA for bdbc3ac - Browse repository at this point
Copy the full SHA bdbc3acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 725a13f - Browse repository at this point
Copy the full SHA 725a13fView commit details -
Replace .yml value from DMPOnline to DMP Assistant
The corresponding value for `devise.mailer.confirmation_instructions.subject` in `config/locales/translation.fr-CA.yml` specifies "Assistant PGD", but maybe it should be verified as well. Note: I don't think this is the proper way to update the locales files. Rather, I believe only `config/locales/en.yml` should be directly modified. However, #920 is currently preventing that.
Configuration menu - View commit details
-
Copy full SHA for c4eecda - Browse repository at this point
Copy the full SHA c4eecdaView commit details -
TEMP: customise devise.failure.unconfirmed values
This commit customises Devise's default value for the key `devise.failure.unconfirmed`. The value adds a link to the email confirmation page. Note: The values for this key in both the `...en-CA.yml` and `...fr-CA.yml` files were provided solely by me and need to be approved/finalised by The Alliance
Configuration menu - View commit details
-
Copy full SHA for 6c41bd7 - Browse repository at this point
Copy the full SHA 6c41bd7View commit details -
Improve UX flow for existing unconfirmed users
This commit seeks to improve the UX flow for existing users with unconfirmed emails. By default, when using Devise's `:confirmable` module, confirmation instructions are sent to the user at the time of account creation. This will be perfect for newly created users, but poses some challenges for existing users. A "first category" of these existing users would be those who were created while `:confirmable` was absent from the codebase. These users are unconfirmed and a confirmation token was never generated for them. A "second category" of these existing users are those that are unconfirmed but do have an existing confirmation token. Since `:confirmable` has been absent from the codebase for years, the most recent `confirmation_sent_at` value is quite old (`Mon, 22 Feb 2021 15:18:24.000000000 UTC +00:00`). The code changes in `app/controllers/sessions_controller.rb` and `app/models/user.rb` improves the UX flow for users in the "first category". Rather than requiring the user to manually request new confirmation instructions, these changes auto-send the email when these users first attempt to sign in. `lib/tasks/dmp_assistant_upgrade.rake` enables this improved UX flow for the aforementioned "second category" of users. `def handle_unconfirmed_users_with_outstanding_invitations` queries for these unconfirmed users and then updates both `confirmation_token` and `confirmation_sent_at` to null. As a result, these users now meet the criteria for the "first category" and can also make use of the improved UX flow.
Configuration menu - View commit details
-
Copy full SHA for 6087aee - Browse repository at this point
Copy the full SHA 6087aeeView commit details -
Handle confirmation for SSO created users
An "SSO created user" is a user whose account was created via the `Sign in with institutional or social ID` button. This occurs when the chosen SSO email is neither already linked to an existing account, nor does there exist a user account with the same email as the chosen SSO supplied email. In order to sign in via SSO, the user must provide the password/credentials for the SSO account that they have chosen. This could be considered a form of email confirmation. And because the user's account email will be set to match this SSO email, it follows that email confirmation via Devise's `:confirmable` module is redundant and can be bypassed. Taking the above reasoning into account, `app/models/user.rb` sets `confirmed_at: Time.now` for any future SSO created accounts. `lib/tasks/dmp_assistant_upgrade.rake` sets `lib/tasks/dmp_assistant_upgrade.rake` for any "existing SSO created accounts". Specifically, to be an "existing SSO created account", BOTH of the following conditions must be met: 1. An Identifier corresponding to the "openid_connect" `IdentifierScheme` exists for the user 2. For the identifier and corresponding user found in 1., the values of `identifier.created_at` and `user.created_at` are within 1 second of each other.
Configuration menu - View commit details
-
Copy full SHA for 465d671 - Browse repository at this point
Copy the full SHA 465d671View commit details -
Re-add SSO linking capability for signed-out users
This commit re-allows existing users to link via SSO while signed out. This functionality was previously removed via commit e112202. The logic works as follows: 1) A user clicks the "Sign in with institutional or social ID" button 2) Within CILogon, the user chooses an email to sign in with. For this particular functionality to be used, the following conditions must both be true for the chosen email: a) It is not currently linked to any user accounts b) It matches an existing user.email in the database 3) If the matching user.email is confirmed, then the SSO email is linked to the user account and the user is signed-in. Otherwise, the user remains signed out and a flash notice is rendered indicating that the user.email requires confirmation.
Configuration menu - View commit details
-
Copy full SHA for 965c336 - Browse repository at this point
Copy the full SHA 965c336View commit details
Commits on Oct 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1caf1f7 - Browse repository at this point
Copy the full SHA 1caf1f7View commit details -
Adapt existing tests to
:confirmable
re-addition`config/environments/test.rb` - Add "SMTP From address" to mock Devise's sending of confirmation instructions email at time of account creation `spec/factories/users.rb` - Set `confirmed_at { Time.now }` in user factory `spec/features/registrations_spec.rb` - Change expected path to `root_path`. This is because the user should not be able to access `plans_path` until after they confirm their email - Add check to verify that the confirmation-related flash message was sent `spec/integration/openid_connect_sso_spec.rb` - Removing `it 'does not create SSO link when user is signed out and SSO email is an existing account email'` test. Commit 965c336 ("Re-add SSO linking capability for signed-out users") updated the SSO behaviour in a manner that this test is no longer relevant.
Configuration menu - View commit details
-
Copy full SHA for bf54e2f - Browse repository at this point
Copy the full SHA bf54e2fView commit details -
Reset
:confirmable
cols for all non-superusers- These changes replace the changes made to `lib/tasks/dmp_assistant_upgrade.rake` in commits 6087aee and 465d671. We are now setting `confirmed_at`, `confirmation_token`, and `confirmation_sent_at` to nil for all users. (the rake task subsequently sets `confirmed_at = Time.now` for all superusers).
Configuration menu - View commit details
-
Copy full SHA for c68f713 - Browse repository at this point
Copy the full SHA c68f713View commit details -
Reuse
signed_up_but_unconfirmed
flash messageThis commit changes the flash message we are using for our custom UX flow. Now, rather than a custom message, we are reusing `devise.registrations.signed_up_but_unconfirmed`.
Configuration menu - View commit details
-
Copy full SHA for fb883ec - Browse repository at this point
Copy the full SHA fb883ecView commit details
Commits on Oct 10, 2024
-
.downcase
SSO email infind_or_initialize_by()
This commit is intended to resolve the following issue: #900
Configuration menu - View commit details
-
Copy full SHA for c996104 - Browse repository at this point
Copy the full SHA c996104View commit details -
Refactor
create_from_provider_data
- `user.email` is already set as desired within `user = User.find_or_initialize_by(email: email)` - Also, the `.presence` method seems to simplify the assignment of `firstname` and `surname`. https://apidock.com/rails/Object/presence
Configuration menu - View commit details
-
Copy full SHA for ade1189 - Browse repository at this point
Copy the full SHA ade1189View commit details -
Configuration menu - View commit details
-
Copy full SHA for e395945 - Browse repository at this point
Copy the full SHA e395945View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab1b121 - Browse repository at this point
Copy the full SHA ab1b121View commit details
Commits on Oct 15, 2024
-
Merge pull request #924 from portagenetwork/aaron/issues/900
Fix User Lookup Via SSO Email: Make Query Case-Insensitive
Configuration menu - View commit details
-
Copy full SHA for 8ef17ee - Browse repository at this point
Copy the full SHA 8ef17eeView commit details
Commits on Oct 16, 2024
-
Enable custom confirmation UX flow for SSO sign in
This commit takes the idea in commit 6087aee and applies it to users signing in via SSO. Via the addition of `app/controllers/concerns/email_confirmation_handler.rb`, some refactoring has been applied here as well.
Configuration menu - View commit details
-
Copy full SHA for a2f607b - Browse repository at this point
Copy the full SHA a2f607bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 414e376 - Browse repository at this point
Copy the full SHA 414e376View commit details -
Some refactoring was performed in `def openid_connect` to avoid adding `Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity` to `rubocop:disable`.
Configuration menu - View commit details
-
Copy full SHA for a25a66a - Browse repository at this point
Copy the full SHA a25a66aView commit details
Commits on Oct 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a77e5fe - Browse repository at this point
Copy the full SHA a77e5feView commit details -
Add tests for custom email confirmation UX flow
- These tests are meant to confirm that the desired behaviour is encountered via our custom email confirmation UX flow. - For more info, See comments for `app/controllers/concerns/email_confirmation_handler.rb`
Configuration menu - View commit details
-
Copy full SHA for 90f65ba - Browse repository at this point
Copy the full SHA 90f65baView commit details -
Test custom I18n strings / override default_locale
In order to properly test the values of our customised `I18n.t` values (specifically, `I18n.t('devise.failure.unconfirmed')` and `I18n.t('devise.registrations.signed_up_but_unconfirmed')`), we need to set `I18n.default_locale` to match our app's default locale. NOTE: These changes only set `I18n.default_locale = :'en-CA'` for the duration of the email confirmation tests. However, it may be best to apply this update globally throughout the tests.
Configuration menu - View commit details
-
Copy full SHA for d0749fb - Browse repository at this point
Copy the full SHA d0749fbView commit details
Commits on Oct 18, 2024
-
Refactor EmailConfirmationHandler
- Rename `def missing_confirmation_instructions_handled?(user)` to `def confirmation_instructions_missing_and_handled?(user)` and add comments to where it is called for easy reference - Move `def confirmed_or_has_confirmation_token?` from User model to `EmailConfirmationHandler`. This check is only accessed by the concern, and it seems easiest to make it a private method and encapsulate the logic there.
Configuration menu - View commit details
-
Copy full SHA for 89f32d0 - Browse repository at this point
Copy the full SHA 89f32d0View commit details
Commits on Oct 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for da9fc60 - Browse repository at this point
Copy the full SHA da9fc60View commit details
Commits on Oct 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 96a2af0 - Browse repository at this point
Copy the full SHA 96a2af0View commit details -
Configuration menu - View commit details
-
Copy full SHA for dabf2f0 - Browse repository at this point
Copy the full SHA dabf2f0View commit details
Commits on Oct 24, 2024
-
Merge pull request #917 from portagenetwork/aaron/issues/916
Disable Updating of User Emails
Configuration menu - View commit details
-
Copy full SHA for fe5da38 - Browse repository at this point
Copy the full SHA fe5da38View commit details -
Address
OmniAuth.config.mock_auth
overridingThis commit is meant to resolve the following issue that resulted from the overriding of `OmniAuth.config.mock_auth[:openid_connect]`: #921 Whenever `OmniAuth.config.mock_auth[:openid_connect]` was being overridden in this file, the value was always subsequently assigned to `@request.env['omniauth.auth']`. These changes simply bypass `OmniAuth.config.mock_auth[:openid_connect]` and directly assign `OmniAuth::AuthHash.new(...)` to `@request.env['omniauth.auth']` instead.
Configuration menu - View commit details
-
Copy full SHA for 296a73f - Browse repository at this point
Copy the full SHA 296a73fView commit details -
Update and re-enable openid_connect features tests
Update and re-enable openid_connect features tests config/secrets.yml - `Rails.application.secrets.omniauth_full_host` does not appear to be necessary in test mode. In fact, if a value exists for `ENV['OMNIAUTH_FULL_HOST']` (e.g. the value set for development) then it results in the tests failing (By default, `Capybara.server_port` is set to a random value, so hardcoding a secret isn't completely straightforward.) spec/integration/openid_connect_sso_spec.rb - Here we are re-enabling the "links account from external credentails" test, which was failing due to the aforementioned issue with `config/secrets.yml`. - We are also adding `:js`, which if desired, makes it simpler to execute these tests in non-headless mode.
Configuration menu - View commit details
-
Copy full SHA for a891e59 - Browse repository at this point
Copy the full SHA a891e59View commit details -
Address
User.from_omniauth
overriding- The code removed via this commit included the comment `# Reset the `from_omniauth` method after each test`. However, rather than restoring the method, the subsequent code redefined it. - As a result, when executed in test files run after this, `User.method(:from_omniauth).source_location` would evaluate to `/spec/controllers/omniauth_callbacks_controller_spec.rb", 109]`. - This commit restores `from_omniauth` to its actual User class definition in the `after do` block of `omniauth_callbacks_controller_spec.rb`.
Configuration menu - View commit details
-
Copy full SHA for b4cbeb5 - Browse repository at this point
Copy the full SHA b4cbeb5View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb9b6ad - Browse repository at this point
Copy the full SHA cb9b6adView commit details -
- `OmniAuth.config.mock_auth[:openid_connect]` is defined in `spec/spec_helper.rb`. These changes remove the custom hash and instead use that pre-made one.
Configuration menu - View commit details
-
Copy full SHA for c542d79 - Browse repository at this point
Copy the full SHA c542d79View commit details -
Configuration menu - View commit details
-
Copy full SHA for b78fbf6 - Browse repository at this point
Copy the full SHA b78fbf6View commit details -
Merge pull request #922 from portagenetwork/aaron/issues/921
Fixes to CILogon / `openid_connect` Tests
Configuration menu - View commit details
-
Copy full SHA for 7d64c24 - Browse repository at this point
Copy the full SHA 7d64c24View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd07ea1 - Browse repository at this point
Copy the full SHA fd07ea1View commit details
Commits on Oct 28, 2024
-
Lower
psych
version to enable .yml syncingThis is necessary due to the following outstanding issue: #933 Output prior to this commit: ``` $ gem list psych *** LOCAL GEMS *** psych (5.1.2, default: 4.0.4, 3.3.4) ```
Configuration menu - View commit details
-
Copy full SHA for a4e5dca - Browse repository at this point
Copy the full SHA a4e5dcaView commit details -
translation:sync
w/ prod key &&!disable_yaml
The change is not commited, but `config.disable_yaml = false` was set in `config/initializers/translation.rb`.
Configuration menu - View commit details
-
Copy full SHA for 7c2cf88 - Browse repository at this point
Copy the full SHA 7c2cf88View commit details -
Revert "Lower
psych
version to enable .yml syncing"This reverts commit a4e5dca.
Configuration menu - View commit details
-
Copy full SHA for ea71a22 - Browse repository at this point
Copy the full SHA ea71a22View commit details -
Remove unused config/locales/ files
For DMP Assistant, `I18n.available_locales == [:"en-CA", :"fr-CA"]`. Thus, we are removing all locales files that do not end with `en.yml`, `en-CA.yml`, or `fr-CA.yml`.
Configuration menu - View commit details
-
Copy full SHA for f600ba0 - Browse repository at this point
Copy the full SHA f600ba0View commit details -
Configuration menu - View commit details
-
Copy full SHA for bae62e9 - Browse repository at this point
Copy the full SHA bae62e9View commit details -
Fix tests: Set
default_locale
to 'en'This change resolves the following error: ``` rspec ./spec/features/modal_search_spec.rb:25 1) ModalSearchDialog Modal search opens and closes and allows user to search, select and remove items Failure/Error: <td><%= l(plan.updated_at.to_date, formats: :short) %></td> ActionView::Template::Error: Translation missing: en-GB.date.formats.default ``` Because en-GB is not a locale used within DMP Assistant, commit f600ba0 removed the related en-GB files from the app. Setting the locale to 'en-CA' unfortunately breaks the tests as well. There is an open issue that seeks to resolve this: #931
Configuration menu - View commit details
-
Copy full SHA for c87ae55 - Browse repository at this point
Copy the full SHA c87ae55View commit details
Commits on Oct 29, 2024
-
Add
scope :search
to ResearchOutput modelSearch by `research_outputs.title` (case-insensitive)
Configuration menu - View commit details
-
Copy full SHA for e289fba - Browse repository at this point
Copy the full SHA e289fbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c5a478 - Browse repository at this point
Copy the full SHA 3c5a478View commit details
Commits on Oct 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b5d95fb - Browse repository at this point
Copy the full SHA b5d95fbView commit details -
Merge pull request #937 from portagenetwork/aaron/locales-cleanup
Apply `translation:sync` to `yaml` Files and Remove Unused `locale/` + `locales/` Files
Configuration menu - View commit details
-
Copy full SHA for 8cf8bab - Browse repository at this point
Copy the full SHA 8cf8babView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42f9067 - Browse repository at this point
Copy the full SHA 42f9067View commit details
Commits on Oct 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c1b2411 - Browse repository at this point
Copy the full SHA c1b2411View commit details
Commits on Nov 4, 2024
-
Add rake task for openid_connect / CILogon cleanup
Intended to resolve this issue: #912 The following PR was used as a reference: #915 Co-Authored-By: Omar Rodriguez Arenas <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7ae2c3b - Browse repository at this point
Copy the full SHA 7ae2c3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f158a7 - Browse repository at this point
Copy the full SHA 7f158a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca1b58a - Browse repository at this point
Copy the full SHA ca1b58aView commit details -
Add finalised email confirmation translations
- Updated via `bundle exec rake translation:sync` with prod key. - These changes finalise some of the initial changes we made for testing in commit 6c41bd7
Configuration menu - View commit details
-
Copy full SHA for 09e731e - Browse repository at this point
Copy the full SHA 09e731eView commit details
Commits on Nov 5, 2024
-
Prevent db sync from test, development, & uat
This change seeks to help prevent us from unwittingly syncing db field data to translation.io while working in certain environments (specifically test, development, and uat).
Configuration menu - View commit details
-
Copy full SHA for 339a694 - Browse repository at this point
Copy the full SHA 339a694View commit details -
Configuration menu - View commit details
-
Copy full SHA for a47df30 - Browse repository at this point
Copy the full SHA a47df30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9779999 - Browse repository at this point
Copy the full SHA 9779999View commit details
Commits on Nov 6, 2024
-
Update test to match updated translation
- The corresponding translation was commited via the following commit: 09e731e
Configuration menu - View commit details
-
Copy full SHA for c6134ae - Browse repository at this point
Copy the full SHA c6134aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a2b126 - Browse repository at this point
Copy the full SHA 0a2b126View commit details -
Merge pull request #945 from portagenetwork/aaron/issues/507
Prevent Uploading of DB Fields to translation.io Within Test, Development, and UAT Environments
Configuration menu - View commit details
-
Copy full SHA for 8670db7 - Browse repository at this point
Copy the full SHA 8670db7View commit details -
Merge pull request #944 from portagenetwork/aaron/issues/912
Add rake task for `openid_connect` / CILogon cleanup
Configuration menu - View commit details
-
Copy full SHA for 344b823 - Browse repository at this point
Copy the full SHA 344b823View commit details -
Merge pull request #923 from portagenetwork/aaron/add-email-confirmation
Email Confirmation Changes
Configuration menu - View commit details
-
Copy full SHA for 1ea6214 - Browse repository at this point
Copy the full SHA 1ea6214View commit details
Commits on Nov 12, 2024
-
Change
research_outputs
to local variableThe corresponding view, `app/views/paginable/research_outputs/_index.html.erb`, uses `scope` rather than `@research_outputs`.
Configuration menu - View commit details
-
Copy full SHA for cffb456 - Browse repository at this point
Copy the full SHA cffb456View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2aed896 - Browse repository at this point
Copy the full SHA 2aed896View commit details
Commits on Nov 18, 2024
-
Merge pull request #938 from portagenetwork/aaron/issues/935
Fix Paginating, Sorting, and Searching Issues Within "Research Outputs" Tab
Configuration menu - View commit details
-
Copy full SHA for cb988d7 - Browse repository at this point
Copy the full SHA cb988d7View commit details