def _resolve_document(request, docid, permission='base.change_resourcebase', msg=_PERMISSION_MSG_GENERIC, **kwargs):
 return resolve_object(request, Document, {'pk': docid}, permission=permission, permission_msg=msg, **kwargs)

def _resolve_document ( request , docid , permission = 'base.change_resourcebase' , msg = _PERMISSION_MSG_GENERIC , ** kwargs ) : return resolve_object ( request , Document , { 'pk' : docid } , permission = permission , permission_msg = msg , ** kwargs )
resolve the document by the provided primary key and check the optional permission .