Fix issue 588 : Redirect connected user to the anonymous url if they don't have register a SSH Key for GIT
This commit is contained in:
		@@ -280,6 +280,14 @@ class IDF_Scm_Git extends IDF_Scm
 | 
			
		||||
 | 
			
		||||
    public static function getAuthAccessUrl($project, $user, $commit=null)
 | 
			
		||||
    {
 | 
			
		||||
        // if the user haven't registred a public ssh key,
 | 
			
		||||
        // he can't use the write url which use the SSH authentification
 | 
			
		||||
        if ($user != null) {
 | 
			
		||||
            $keys = $user->get_idf_key_list();
 | 
			
		||||
            if (count ($keys) == 0)
 | 
			
		||||
                return self::getAnonymousAccessUrl($project);
 | 
			
		||||
        } 
 | 
			
		||||
        
 | 
			
		||||
        return sprintf(Pluf::f('git_write_remote_url'), $project->shortname);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user