add specs for permissions check for git/ssh.
pass specs and add private_* support to git/ssh.
extract permissions-check (git/ssh) into methods

Thise includes the following:
  - Everyone-Case
  - Permission-based handling
  - Role-based handling.
use boolean in git/ssh instead of if-elsif-else.
Merge pull request #900 from ontohub/898-handle_private_repositories_for_ssh

898 handle private repositories for ssh