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

Autolab config master cherrypick #2028

Merged
merged 20 commits into from
Apr 2, 2024
Merged

Autolab config master cherrypick #2028

merged 20 commits into from
Apr 2, 2024

Conversation

najclark
Copy link
Contributor

Description

Cherrypicks merge commits the following PRs from the develop/autolab-3.0 branch:
Create Autolab configure tabs: #1825
Autolab config UI smtp: #1839
Add GitHub Configuration Tab to Configure Autolab: #1843
Google OAuth Config UI: #1870
OAuth flow fix: #1892

Motivation and Context

To merge changes from the develop branch into master.

How Has This Been Tested?

Follow the testing plans outlined in the following PRs:
Autolab config UI smtp: #1839
Add GitHub Configuration Tab to Configure Autolab: #1843
Google OAuth Config UI: #1870
OAuth flow fix: #1892

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop and erblint for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

najclark and others added 6 commits December 8, 2023 15:24
* Create Autolab configure tabs

* Delete lti_tool_jwk.json

* Delete lti_platform_jwk.json

* addressed autolab_config spec nit

---------

Co-authored-by: Nicholas Clark <[email protected]>
Co-authored-by: Victor Huang <[email protected]>
* Oauth config page UI

* OAuth UI config complete

* Addressed nit

---------

Co-authored-by: Nicholas Clark <[email protected]>
* Oauth config page UI

* OAuth UI config complete

* Addressed nit

* Overhauled oauth workflow

* Fixed new user registration flow

* Fixed issue with user confirmation not being overridden by OAuth

* Fixed OAuth button on hover color

---------

Co-authored-by: Nicholas Clark <[email protected]>
* Create Autolab configure tabs

* SMTP config page

* SMTP config page implementation complete

* Delete lti_platform_jwk.json

* Delete lti_tool_jwk.json

* Added default_from field to smtp config settings page

* Moved default from input to seperate section

---------

Co-authored-by: Nicholas Clark <[email protected]>
* Adds github integration config form

* Add GitHub Configuration Page

* Update Github integration documentation

* Display current github config
@reviewpad reviewpad bot requested a review from damianhxy December 11, 2023 22:41
Copy link
Contributor

coderabbitai bot commented Dec 11, 2023

Walkthrough

This update introduces significant enhancements and bug fixes across the application, focusing on improving OAuth flow, updating gem dependencies, and expanding configuration management for SMTP, GitHub, OAuth, and LTI settings. It also enhances user experience by refining UI elements and streamlining the authentication process for new and existing users, aligning with standard OAuth behaviors seen on other platforms.

Changes

File(s) Change Summary
.gitignore Added config files for SMTP, GitHub, and OAuth; updated LTI tool config location.
Gemfile Updated gems; added OAuth2 and CSRF protection gems; reordered declarations.
app/assets/javascripts/autolab_config.js Added event listeners for initializing tab and collapsible components using jQuery.
app/assets/stylesheets/style.css.scss Added CSS rule for .oauth-btn:hover to change background color to $autolab-subtle-gray.
app/controllers/... (admins_controller.rb, new config controllers) Added new controllers for config management; updated admin actions; added rescue_from block.
app/controllers/users/omniauth_callbacks_controller.rb Refined OAuth flow control logic.
app/mailers/course_mailer.rb, app/models/user.rb Enhanced email and user model functionalities for SMTP settings and OAuth support.
app/views/admins/_github_integration.html.erb through app/views/layouts/_navbar.html.erb Updated views for config management and UI improvements.
config/application.rb, config/environments/..., config/routes.rb Renamed config parameters; introduced conditional config loading; added routes for config updates.
docs/installation/github_integration.md, spec/... Updated documentation and tests.

Assessment against linked issues

Objective Addressed Explanation
Fix OAuth flow to align with standard behaviors (Issues #1892, #1873)
Redirect new users to a welcome page after OAuth sign-in
Ensure existing users are redirected to their courses page after OAuth sign-in
Allow users to log in with standard authentication after using OAuth

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@reviewpad reviewpad bot added large Pull request is large waiting-for-review labels Dec 11, 2023
app/mailers/course_mailer.rb Show resolved Hide resolved
app/controllers/smtp_config_controller.rb Show resolved Hide resolved
app/controllers/smtp_config_controller.rb Show resolved Hide resolved
app/controllers/smtp_config_controller.rb Outdated Show resolved Hide resolved
app/controllers/smtp_config_controller.rb Show resolved Hide resolved
app/controllers/lti_launch_controller.rb Outdated Show resolved Hide resolved
app/controllers/github_config_controller.rb Show resolved Hide resolved
config/routes.rb Show resolved Hide resolved
app/controllers/lti_launch_controller.rb Show resolved Hide resolved
app/controllers/admins_controller.rb Outdated Show resolved Hide resolved
app/controllers/admins_controller.rb Outdated Show resolved Hide resolved
app/views/admins/_oauth_integration.html.erb Outdated Show resolved Hide resolved
app/views/admins/_github_integration.html.erb Outdated Show resolved Hide resolved
app/controllers/smtp_config_controller.rb Outdated Show resolved Hide resolved
app/controllers/lti_launch_controller.rb Outdated Show resolved Hide resolved
@damianhxy damianhxy self-assigned this Mar 25, 2024
@damianhxy
Copy link
Member

@coderabbitai pause

@damianhxy
Copy link
Member

@coderabbitai review

@damianhxy damianhxy added this pull request to the merge queue Apr 2, 2024
Merged via the queue into master with commit ce0533d Apr 2, 2024
5 checks passed
@damianhxy damianhxy deleted the autolab-config-master branch April 2, 2024 03:30
NicholasMy pushed a commit to UB-CSE-IT/Autolab that referenced this pull request Jan 10, 2025
* Create Autolab configure tabs (autolab#1825)

* Create Autolab configure tabs

* Delete lti_tool_jwk.json

* Delete lti_platform_jwk.json

* addressed autolab_config spec nit

---------

Co-authored-by: Nicholas Clark <[email protected]>
Co-authored-by: Victor Huang <[email protected]>

* Google OAuth Config UI (autolab#1870)

* Oauth config page UI

* OAuth UI config complete

* Addressed nit

---------

Co-authored-by: Nicholas Clark <[email protected]>

* OAuth flow fix (autolab#1892)

* Oauth config page UI

* OAuth UI config complete

* Addressed nit

* Overhauled oauth workflow

* Fixed new user registration flow

* Fixed issue with user confirmation not being overridden by OAuth

* Fixed OAuth button on hover color

---------

Co-authored-by: Nicholas Clark <[email protected]>

* Autolab config UI smtp (autolab#1839)

* Create Autolab configure tabs

* SMTP config page

* SMTP config page implementation complete

* Delete lti_platform_jwk.json

* Delete lti_tool_jwk.json

* Added default_from field to smtp config settings page

* Moved default from input to seperate section

---------

Co-authored-by: Nicholas Clark <[email protected]>

* Add GitHub Configuration Tab to Configure Autolab (autolab#1843)

* Adds github integration config form

* Add GitHub Configuration Page

* Update Github integration documentation

* Display current github config

* Fixed cherrypick issues

* Update Gemfile.lock

* Run Rubocop

* Undo changes, fix tests

* fix admin controller tests

* fix lti config controller tests

* Remove redundant titles

* Remove redundant tags, make file extension of `_lti_integration.html.erb` consistent

* Add missing raises

* Remove rescue_from

* Remove extraneous tmpfile param

---------

Co-authored-by: Nicholas Clark <[email protected]>
Co-authored-by: Victor Huang <[email protected]>
Co-authored-by: Damian Ho <[email protected]>
Co-authored-by: Joey Wildman <[email protected]>

(cherry picked from commit ce0533d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants