func removeUserFromTeamInGandalf(u *auth.User, team string) error { gURL := repository.ServerURL() alwdApps, err := u.AllowedAppsByTeam(team) if err != nil { return err } if err := (&gandalf.Client{Endpoint: gURL}).RevokeAccess(alwdApps, []string{u.Email}); err != nil { return fmt.Errorf("Failed to revoke access from git repositories: %s", err) } return nil }