Refer this filter :bp_course_api_get_user_course_status_item for unit data filter.Which is available in the vibe-course-module plugin.
Also, we need FTP, admin, and test user credentials in private reply. Also which course and unit you are using restriction.
Please share a video related to that.
Also for your membership plugin is that any function to check post_id is accessible from given user_id. please ask from the developer