Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Instead of returning in the page callback, the checks on $project->versioncontrol_project and $repo should be in an access callback. That way, the tab won't show at all for projects it doesn't apply to.
You'll want to be sure to also check project_user_access() in your access callback.
Comments
Comment #1
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedCommitted http://drupalcode.org/project/project_git_default_branch.git/commitdiff/....