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

Niklas Fiekas’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.