Skip to content

Commit

Permalink
Merge branch 'release-150' into ea/shape-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders authored Feb 5, 2025
2 parents 30a5a46 + a378d47 commit 5e91b88
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/controllers/cohorts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def create

# If the user doesn't have All Cohorts access, grant them access to the cohort
@cohort.replace_access(current_user, scope: :editor)
@cohort.replace_access(current_user, scope: :viewer)
# Always add the cohort to the system group
AccessGroup.maintain_system_groups(group: :cohorts)
# Add default tabs
Expand All @@ -150,7 +151,7 @@ def create
end
end
# Search the list so you can see the newly created cohort
redirect_to cohorts_path('q[name_cont]' => @cohort.name)
redirect_to cohorts_path('search_form[q]' => @cohort.name)
rescue Exception => e
flash[:error] = e.message
redirect_to cohorts_path
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/notification_configurations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ def destroy
helper_method :import_threshold

def notification_configuration
@notification_configuration ||= GrdaWarehouse::NotificationConfiguration.find_safely(params[:id]) ||
@notification_configuration ||= if params[:id].present?
GrdaWarehouse::NotificationConfiguration.find_safely(params[:id])
else
GrdaWarehouse::NotificationConfiguration.new(
source: import_threshold,
notification_slug: import_threshold.valid_notification_slug(params[:notification_slug]),
)
end
end
helper_method :notification_configuration
end
6 changes: 5 additions & 1 deletion app/controllers/project_groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def index

def new
@project_group = project_group_source.new
set_access
set_group_access
end

def create
Expand Down Expand Up @@ -166,6 +166,10 @@ def set_project_group

def set_access
@editor_ids = @project_group.editable_access_control.user_ids
set_group_access
end

def set_group_access
# TODO: START_ACL remove when ACL transition complete
@groups = @project_group.access_groups
@group_ids = @project_group.access_group_ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%table.table.table-striped.mb-0
%thead
%tr
- age_label = if can_view_full_dob? then 'DOB' else 'Age' end
- age_label = if current_user.can_view_full_dob? then 'DOB' else 'Age' end
%th Client
%th= age_label
%th Last Seen
Expand All @@ -21,8 +21,8 @@
- @clients.each do |client|
- projects = client.last_intentional_contacts( current_user, include_confidential_names: false, include_dates: true).select(&:present?)
%tr
%td= link_to_if can_view_clients?, client.name, appropriate_client_path(client)
%td= dob_or_age(client.dob)
%td= link_to_if current_user.can_view_clients?, client.name, appropriate_client_path(client)
%td= client.pii_provider(user: current_user).dob_or_age
%td
- projects.each do |p|
= p
Expand Down

0 comments on commit 5e91b88

Please sign in to comment.