- # log if we have authenticated using basic auth
- logger.info "Authenticated as user #{current_user.id} using basic authentication" if current_user
+ if username && current_user
+ if Settings.basic_auth_support
+ # log if we have authenticated using basic auth
+ logger.info "Authenticated as user #{current_user.id} using basic authentication"
+ else
+ report_error t("application.basic_auth_disabled", :link => t("application.auth_disabled_link")), :forbidden
+ end
+ end