Enhanced authorization logic to check repositories ending with or without ".git" suffix.