Use current_user_can() to build bp_docs_doc_action_links()