<% # link to repo tree/file only if the repo is readable
# and the commit is a sha1...
repo =
- (not Repository.disable_repository_browsing? and
- /^[0-9a-f]{40}$/ =~ current_component[:script_version] and
+ (/^[0-9a-f]{40}$/ =~ current_component[:script_version] and
Repository.where(name: current_component[:repository]).first)
# ...and the api server provides an http:// or https:// url