Skip to content

Commit

Permalink
Check api_user, not api_user.user, for admin flag
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Oct 17, 2023
1 parent 377fc00 commit 05cbc91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/project_preferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05cbc91

Please sign in to comment.