Use current_user_can() in integration-groups.php
Tests for BP_Docs_Group_Integration::user_can_associate_doc_with_group()