From 05cbc9185688e746febf76e1b0ef48fafd3ae30c Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Tue, 17 Oct 2023 17:01:47 -0500 Subject: [PATCH] Check api_user, not api_user.user, for admin flag --- app/controllers/api/v1/project_preferences_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/project_preferences_controller.rb b/app/controllers/api/v1/project_preferences_controller.rb index c690984d0..8a0b49b24 100644 --- a/app/controllers/api/v1/project_preferences_controller.rb +++ b/app/controllers/api/v1/project_preferences_controller.rb @@ -26,7 +26,7 @@ def find_upp_for_update_settings end def user_allowed? - @upp.project.owners_and_collaborators.include?(api_user.user) || api_user.user.is_admin? + @upp.project.owners_and_collaborators.include?(api_user.user) || api_user.is_admin? end def update_settings_response