From 85779b4038619f99ba058091a06863e447f0e240 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Fri, 1 Nov 2024 10:30:30 -0500 Subject: [PATCH] super_admin should be valid for admin --- app/models/user.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 68eaec438e6..0d50ba87888 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -30,6 +30,10 @@ def request_impersonation_for(user_id) impersonator_support_sessions.create!(impersonated: impersonated) end + def admin? + super_admin? || role == "admin" + end + def display_name [ first_name, last_name ].compact.join(" ").presence || email end