implements authorizations for documents delete function