Better function names in lib/api/helpers/packages/basic_auth_helpers.rb
The following discussion from !48356 (merged) should be addressed:
-
@10io started a discussion:
We can't use
find_group!
because if the Group is not found and there is nocurrent_user
, the backend has to send401 Unauthorized
and not404 Not found
. This is to tellnuget
: hey you can't do that anonymously, send your credentials of you them!We're simply porting the
authorized_project_find!
function for the Group object. Notice that I update the name, having the verb at the end of the function name feels strange. I plan to update the other functions in a different MR, I don't want to deal with function renames in this MR. It's already big enough