Skip to content

feat: Customization for UW Health and development#8

Draft
moop-moop wants to merge 42 commits intomainfrom
nm/customize-uwhealth
Draft

feat: Customization for UW Health and development#8
moop-moop wants to merge 42 commits intomainfrom
nm/customize-uwhealth

Conversation

@moop-moop
Copy link
Copy Markdown
Member

This pull request introduces several updates, including dependency management improvements, LDAP authentication enhancements, UI/UX updates, and deployment configuration changes. Below is a categorized summary of the most important changes:

Dependency and Configuration Updates:

  • Added a .github/dependabot.yml file to enable weekly dependency updates for Bundler, excluding Rails versions >= 7.2.0.
  • Updated the Gemfile to restrict Rails to versions < 7.2.0 and added ed25519 and bcrypt_pbkdf gems for cryptographic support. [1] [2]

LDAP Authentication Enhancements:

  • Introduced modular LDAP authentication with support for custom, local, and default LDAP modules, selected based on environment variables and Rails environment. (F50b016cR1, [1] [2]
  • Updated the SessionsController#create method to handle LDAP authentication errors gracefully and log failures. (F50b016cR1)
  • Modified the LDAP attribute mapping to use sAMAccountName instead of uid for internet_id.

UI/UX and Branding Updates:

  • Added new UW Health-specific SCSS variables and styles for consistent branding across the application.
  • Replaced images and logos in various views (home/index.html.erb, _navbar.html.erb, _footer.html.erb) with UW Health-specific assets and updated the footer text to reflect UW Health support. [1] [2] [3]
  • Added a new _custom_analytics.html.erb partial for integrating custom analytics (e.g., Piwik Pro).

Deployment and Environment Configuration:

  • Updated config/deploy.rb to dynamically set server and repository details from environment variables, added bundler settings, and improved linked files configuration.
  • Added a new config/deploy/dev.rb file for Capistrano deployment configuration in the development environment.

Miscellaneous Changes:

  • Renamed config/database.yml to config/database.example.yml for better configuration management.
  • Updated application.html.erb and embed.html.erb layouts to use UW Health-specific icons and improved analytics handling. [1] [2] [3]

@moop-moop moop-moop requested a review from Copilot May 9, 2025 16:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR customizes the application for UW Health and updates several configurations. Key changes include dependency management and deploy configuration updates, LDAP authentication enhancements with modular support, and UI/UX branding modifications using UW Health assets.

Reviewed Changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config/environments/dev.rb Updated development config with production-like caching and asset settings
config/deploy/*.rb Added stage-specific deployment configurations and environment variable support
config/database.example.yml Minor cleanup of database configuration example
app/views/shared/_navbar.html.erb Updated the logo asset and alt text to reflect UW Health branding
app/views/shared/_footer.html.erb Revised footer content to incorporate new UW Health support information
app/views/layouts/* Adjusted layout metadata and icon paths for UW Health
app/views/home/index.html.erb Replaced older images with UW Health–specific assets and modified linked elements
app/lib/modules/* Introduced modular LDAP authentication (local, default, and custom) with attribute updates
app/controllers/sessions_controller.rb Enhanced LDAP authentication error handling and changed attribute mapping in user sessions
app/assets/stylesheets/theme/uwhealth.scss Added new UW Health styling and color scheme
Gemfile Updated Rails version constraint and added cryptographic support gems
.github/dependabot.yml Configured weekly dependency updates for Bundler with Rails version exclusion

@@ -1,5 +1,5 @@
<div class="container-fluid">
<%= image_tag 'logo.png', class: 'logo', alt: 'UMN logo' %>
<%= image_tag 'uwhealth_logo.png', class: 'logo', alt: 'UW Healtgh logo' %>
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

The alt text contains a spelling error ('Healtgh'). Please correct it to 'UW Health logo'.

Suggested change
<%= image_tag 'uwhealth_logo.png', class: 'logo', alt: 'UW Healtgh logo' %>
<%= image_tag 'uwhealth_logo.png', class: 'logo', alt: 'UW Health logo' %>

Copilot uses AI. Check for mistakes.
_return[:message] = ''

# Initialize the LDAP connection

Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

The variable 'username_full' is only defined when 'username' does not contain '@', which may lead to an undefined variable error if an email address is passed. Consider initializing 'username_full' for both cases.

Suggested change
# Initialize username_full with a default value
username_full = username

Copilot uses AI. Check for mistakes.
_return[:message] = ''

# Initialize the LDAP connection

Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

The variable 'username_full' is only set when 'username' does not contain '@', leading to a potential undefined variable error for email addresses. Define 'username_full' in all cases to ensure proper LDAP authentication.

Suggested change
# Define username_full by default and override if necessary
username_full = username

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants